- 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;
}
}
2 . Getting proxy while console.log(state)
in cart Slice (Redux)
solved by
import { current } from '@reduxjs/toolkit';
...
console.log(current(state));
Top comments (1)
you still you any up there, i could have gone for
what is the difference?