You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everything worked, so I assumed I was allowed to ignore the second param to createStore.
A little later, after I'd forgotten about this, I popped open the console in chrome and saw a fairly nasty stack trace coming out of the dispatcher. A couple hours of hunting later, I discovered my mistake.
It would be great if either:
When no callback is specified, an error is thrown stating that the callback is a mandatory parameter
When no callback is specified, a default, empty callback is substituted.
Will fork and submit a PR this weekend.
Stack:
TypeError: undefined is not a function
at Dispatcher.$Dispatcher_invokeCallback
at Dispatcher.dispatch
at
at $$$internal$$initializePromise
at new $$es6$promise$promise$$Promise
at
at $$$internal$$tryCatch
at $$$internal$$invokeCallback
at
at MutationObserver.$$asap$$flush
The text was updated successfully, but these errors were encountered:
you're right, @tomatau - it doesn't really make any sense to have a store with no callback. Feedback would be nice to let you know you did something weird.
Recently had a store that, at least initially, handled no actions. when creating it, I wrote this:
Everything worked, so I assumed I was allowed to ignore the second param to
createStore
.A little later, after I'd forgotten about this, I popped open the console in chrome and saw a fairly nasty stack trace coming out of the dispatcher. A couple hours of hunting later, I discovered my mistake.
It would be great if either:
Will fork and submit a PR this weekend.
Stack:
The text was updated successfully, but these errors were encountered: