Comments (8)
Wait, why [email protected] is used as a dependency in [email protected]? why not 1.2.0? And why don't just use React's built-in, as you wrote in your article?
from react-redux.
^1.0.0 means you should get 1.2.0, that's how semantic versioning works.
as for why it's used rather than the built-in, it's because React Redux uses useSyncExternalStoreWithSelector
which is still not built into React.
from react-redux.
@EskiMojo14 Ah, I missed that. I'm also confused with that, because it doesn't reduce the bundle size at all, and looks like it may result in using a buggy package (#2060 #1981). Hope the state of this issue won't get stale like the state of the redux store in my and the mentioned issues.
from react-redux.
Can you provide an example project that reproduces the issue, or record and share a Replay ( https://replay.io/record-bugs ) ? I can't immediately think of anything likely to be related here, and the description doesn't give much detail for us to investigate. useSyncExternalStore is built into React, so we just rely on that.
from react-redux.
@markerikson Suddenly, this one happen occasionally, but it cannot be considered as "rare". I caught the bug only once, but I missed that opportinuty in a dump way: I entered another module, and since we can only re-render by setting some state, I could not get back to my original module with the blur event to test it properly. I already wrote our other developers to be aware of this issue, and if it occurs, not reload the page and connect on that. When it happens, I, of course, will send here a replay.
I think that the issue is in that package because:
- Was pointed out by other people
- It really is the change that might've caused it, because I compared 7.2.7, 8.1.3, and 9.0.4, and it looks like the root cause candidate
from react-redux.
I'm not sure what you're pointing to as the "root cause". Can you clarify? Does it also occur with v7.x?
from react-redux.
@markerikson The thing is that in in 7.x (at least in 7.2.7) use-sync-external-store
is not being used at all. Instead, there was a counter forcing re-renders. This bug started occuring after we switched to one of the newer versions. "Root cause" is just what simply caused the bug and what needs to be fixed.
Replays:
- https://www.loom.com/share/89b5849a9f054933b439c902ba2fcfd6?sid=90fca031-a1d3-44e8-828a-deb5c75f13a3 (the main part is in the beggining, where the store state changes only after setState (i.e.
'blur'
event being fired)) - https://www.loom.com/share/ac1594bc24144d4287518fd922ac2c90?sid=b70b64d4-4a6b-4717-8238-7fc4f2bb7dad (all the state that is not updating is store state)
from react-redux.
@retueZe that's actually exactly my point.
If it occurs in 7, 8, and 9, then it's most likely a bug with React-Redux.
If it occurs with 8 and 9, but not 7, then it's most likely a bug with React itself (and thus the "root cause" is in React, and an issue should be filed over there instead).
I'm afraid videos aren't going to really help here - either way this really needs some kind of a reproduction project that can be investigated, or an actual Replay recording ( https://replay.io/record-bugs , which captures the actual app execution ).
from react-redux.
Related Issues (20)
- Provider properties for dev checks to be passed explicitly to new devModeChecks property HOT 7
- Getting Syntax error for react-redux when building project HOT 4
- Connect not working with detox envinronment HOT 2
- Getting issue in middleware of configureStore when update redux-toolkit to 2.0.1 HOT 1
- useDispatch() causing unexpected navigate back to previous screen HOT 3
- Single global store and two Provider occurs an error for microfrontend app HOT 1
- Test fail with provider in react-native HOT 3
- useSelector hook seems to break hook parsing in React Developer Tools HOT 2
- TypeScript: not possible to use a component's `store` and `context` props when wrapped with `connect` HOC HOT 2
- docs: v9.0.0 release missing information HOT 1
- Connected children components might have mapStateToProps not called HOT 18
- Website search is broken HOT 2
- Hooks API Reference uses misnamed type in the useSelector() example HOT 1
- Include UMD build artifacts for latest release HOT 2
- Unstable selectors causes infinite loop in React
- Can't NPM Install Redux with Vite React + Typescript HOT 2
- Compatibility with React 19 types HOT 3
- Getting erro while installing react-redux example project of Nextjs HOT 1
- Unable to install @reduxjs/toolkit on Next.js project HOT 7
- Is there any plan to resolve the CVE-2023-45133 vulnerability that depends on the software Babel? 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 react-redux.