Git Product home page Git Product logo

Comments (5)

deeppatel234 avatar deeppatel234 commented on August 15, 2024 5

@Vadorequest @ivawzh nextjs support will be added soon. idea is to use devtool without any node module. POC is in progress. will be release soon.

Thanks for your patience,
Deep

from react-context-devtool.

deeppatel234 avatar deeppatel234 commented on August 15, 2024 2

@ivawzh @Vadorequest @nitrique NextJS support added in new version on react-context-devtool. now you can run this extension without any node module. Thank you for your patience.

Cheers 🍻

from react-context-devtool.

Vadorequest avatar Vadorequest commented on August 15, 2024

@deeppatel234 Any idea how to do this? 😄

from react-context-devtool.

Vadorequest avatar Vadorequest commented on August 15, 2024

Awesome, thank you for the quick feedback!

from react-context-devtool.

nitrique avatar nitrique commented on August 15, 2024

Hi @ivawzh, I do that way (but maybe we have a better way to do it)

export const UserProvider: FunctionComponent = ({ children }) => {
    const isDev = global._REACT_CONTEXT_DEVTOOL

   // ... other code

   return (
        <UserContext.Provider
            value={{
                authenticated,
                setAuthenticated,
                cart,
                addToCart
            }}
        >
            {isDev && (
                <ContextDevTool
                    context={UserContext}
                    id="userCtx"
                    displayName="Current User"
                />
            )}

            {children}
        </UserContext.Provider>
    )
}

from react-context-devtool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.