Comments (3)
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.
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.
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)
- Component not aware of state change? HOT 29
- Try new proxyequal HOT 19
- Stale props issue in selector API HOT 10
- Question: Ease of gradual transition to hooks concern HOT 3
- Add comparison with react-redux v7.1 in README
- Benchmarking with cocktails app by mikeyhogarth HOT 5
- Why calculateChangedBits = () => 0 HOT 16
- Discussions about proxy-polyfill HOT 1
- Benchmarking state usage tracking and other related projects HOT 5
- "Please use <Provider store={...}>..." exception unable to track down root cause HOT 3
- 'Please use <TrackedState...>' exception. Need help! HOT 6
- useTrackedState on an array does not trigger a rerender of FlatList with the extraData prop HOT 4
- Question about re-evaluation strategy HOT 9
- False negatives in tracking with React.memo
- A new API for reverting proxy
- Discussion: Antipattern to recommend `useTrackedSelector` HOT 4
- Testing Environment Slowdown HOT 4
- SSR and `useLayoutEffect` issues warning in dev mode HOT 2
- Why is "patchStore" not exporte? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactive-react-redux.