DEV Community 👩‍💻👨‍💻


Posted on • Updated on

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';
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Good news! You can update to dark mode in your DEV settings.