-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Throw new error when initial state is undefined #2461
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 661dabd:
|
✅ Deploy Preview for redux-starter-kit-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
a474db3
to
89bff79
Compare
@markerikson it should be throw new error or console.error? |
Heh, sorry - I had assumed "throw", Lenz said "print a console error", so we'll go with Lenz's opinion here :) |
@dannielss : yeah, let's go with: console.error('You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`') |
Updated to console.error |
Thanks! At a minimum this will end up going out in 1.9. If we end up doing a 1.8.x minor release before then, it'll be part of that first. |
Add a new error when initial state is undefined on createSlice.ts.
Issue: #2459