Giter Club home page Giter Club logo

Comments (8)

retueZe avatar retueZe commented on June 8, 2024

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.

EskiMojo14 avatar EskiMojo14 commented on June 8, 2024

^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.

retueZe avatar retueZe commented on June 8, 2024

@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.

markerikson avatar markerikson commented on June 8, 2024

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.

retueZe avatar retueZe commented on June 8, 2024

@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:

  1. Was pointed out by other people
  2. 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.

markerikson avatar markerikson commented on June 8, 2024

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.

retueZe avatar retueZe commented on June 8, 2024

@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:

  1. 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))
  2. 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.

markerikson avatar markerikson commented on June 8, 2024

@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)

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.