GithubHelp home page GithubHelp logo

Comments (3)

bostondv avatar bostondv commented on June 9, 2024 1

Thanks for setting up that sandbox. In our app (where there may be other factors at play) its not working but I see its working here. In our app the state I'm passing into the function is a Proxy, so it should be returning the plain object.

Being a more complex scenario my best guess right now its exposing a bug this simpler example is not or there's something else wrong in our app. I'll try to reproduce the behavior in the sandbox and post my findings!

from reactive-react-redux.

bostondv avatar bostondv commented on June 9, 2024 1

FWIW I haven't been able to reproduce it yet in the sandbox. We use immer and a custom context that we compose into a custom hook. I've roughly replicated here https://codesandbox.io/s/objective-jones-6fnin, but all seems to be working well. Still digging...

from reactive-react-redux.

dai-shi avatar dai-shi commented on June 9, 2024

Thanks for trying. The implementation is intentional: getUntrackedObject returns null if the object is not proxied.
You could implement a helper function.

const getUntrackedObjectIfTracked = (obj) => getUntrackedObject(obj) || obj;

That said, there can be a bug. Could you reproduce the behavior you found?
I did try it, but it seems working. 👉 https://codesandbox.io/s/condescending-night-2ctbc (Person.tsx L14)

from reactive-react-redux.

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.