Git Product home page Git Product logo

Comments (7)

timdorr avatar timdorr commented on July 17, 2024

We don't run those checks in production mode because they will produce errors the user won't see nor will mean anything to them.

I'm not sure I agree that wrapping these settings in another level of objects makes things more clear. It seems like needless indirection. It doesn't really affect anything, as you will always see these things during dev or test modes and will have the tools to address any issues there. Whereas in production those tools are not usually available.

from react-redux.

michael-freidgeim-webjet avatar michael-freidgeim-webjet commented on July 17, 2024

@timdorr “ We don't run those checks in production mode”
The problem is that the current names usage gives impression for the opposite- that they used in any mode.
When someone sees
Provider store={store} stabilityCheck="always"
they will ask - how to specify, that the flag is applied only in dev mode.

If you don’t want to create a new object, consider to give properties more descriptive names, e.g. devModeStabilityCheck and devModeIdentityFunctionCheck

from react-redux.

phryneas avatar phryneas commented on July 17, 2024

You will only ever notice that these options exist when you get the according error messages, which will hopefully trigger that you read up on those error messages. 99% of the time after that you won't need those options, but will instead fix your code.

Only in very rare cases you will ever need to set those options. In those cases you will have recognized a need for those options, and looked them up in the documentation - which tells you that they are dev-only checks.

In this case, it seems you only looked at the examples without reading the text above them - the first words are literally "in developement".
grafik

What might be a good idea would be that we add docblocks to these options, explaining a little more about them - but generally, these should never be discovered any other way than "I saw the error message and then I read the docs".

Changing their name won't help, since the name still wouldn't explain what they exactly do - in the end we would end up with devModeCheckThatWillCheckIfYourSelectorReturnsAStableResultForMoreInformationPleaseReadTheDocumentation="once".

We can only document so much :/

from react-redux.

EskiMojo14 avatar EskiMojo14 commented on July 17, 2024

It's also worth noting that any change to naming or format at this point would be a breaking change, meaning it couldn't be done until the next major release.

from react-redux.

aryaemami59 avatar aryaemami59 commented on July 17, 2024

If you hover over them, the description actually states that they run in development mode.

from react-redux.

michael-freidgeim-webjet avatar michael-freidgeim-webjet commented on July 17, 2024

@phryneas “You will only ever notice that these options exist”
People notice when they see the code Provider store={store} stabilityCheck="always" (that likely was set by some other developer”
Self-explaining name is preferred to ambiguous name, that require documentation to understand the functionality.
@EskiMojo14 , yes, it is proposed to consider for the next major release.
@aryaemami59 not every tool/ide supports hover over.

from react-redux.

phryneas avatar phryneas commented on July 17, 2024

@michael-freidgeim-webjet it's as self-explanatory as <div>, Provider, children, or store:
Everything needs to be looked up or learned once.

The alternative would really be a name that's probably as long as the full documentation - what seems intuitive for you will seem unintuitive for someone else, so we'd end up patching more and more words onto it with every complaint up to the point where it becomes unwieldable.

The current name is fine and we are not going to change it for people who refuse to use a modern IDE or read the documentation.
If you suspect that someone in your team might see it and not know what it means, you are free to add a comment to your code.

<Provider  store={store} /*devModeOnly*/stabilityCheck="always">{children}</Provider>

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.