-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
beautiful-react-redux/check should be configurable #4
Comments
The only question - who we are going to confugure - beautiful-react-redux, which could wrap There is also one more point to configure - "the safe" memoization mode (https://github.com/theKashey/memoize-state/blob/master/src/index.js#L240) used here. It will also check that 2 "same" mapStateToProps calls will use the same keys to generate result, which may fail if you have deep reselect cascade. Ie, look like configuration should be just passed down to memoizeState, and there is 3 points to set
2 last are enabled by default, but might be better disabled. |
import setConfig from 'beautiful-react-redux/check'
setConfig({ onNotPure: (...errormsg) => { throw new Error(errormsg.join('')); Not documented feature yet, not sure about naming. But you could try it. |
Looks good! setConfig({onError: (err) => throw err}); I don't think you can do much with whatever array is passed in. But huge thanks anyway 👍 |
And now I have understand how to make it better.... |
The initial suggestions will be to allow throw an error instead of console.error.
It might look like this:
Any other thoughts @theKashey?
The text was updated successfully, but these errors were encountered: