Some un-common Errors I am facing during work -

govindbisen

govindbisen

Posted on August 16, 2022

Some un-common Errors I am facing during work -
  1. Property 'Razorpay' does not exist on type 'Window & typeof globalThis'.

I came across this error and it was not so easy for me to solve this, that's why creating this small article.

I am working in ReactTs
you will probably use
var rzp1 = new Razorpay(options); or
var rzp1 = new window.Razorpay(options);

above your react class or function put

declare global {
  interface Window {
    // ⚠️ notice that "Window" is capitalized here
    Razorpay: any;
  }
}
Enter fullscreen mode Exit fullscreen mode

2 . Getting proxy while console.log(state) in cart Slice (Redux)

solved by

import { current } from '@reduxjs/toolkit';
...
console.log(current(state));
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
govindbisen
govindbisen

Posted on August 16, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related