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
{{ message }}
This repository has been archived by the owner on Jul 31, 2018. It is now read-only.
Hi,
I'm changing todos 'add todo' reducer to set completed to true on creation and I get:
[HMR] Cannot apply update. Need to do a full reload!
dev-server.js:19 [HMR] Error: Expected the reducer to be a function. Instead got an object with a "default" field. Did you pass a module instead of the default export? Try passing require(...).default instead.
Tested on unmodified Todo app,
Any ideas?
The text was updated successfully, but these errors were encountered:
Note that when using require if you want the default export you need to manually grab it through .default. Reason for this is require doesn’t handle both default and normal exports so you have to specify which to return. Whereas import has a system for this in place so it knows already (eg. import foo from 'bar') vs import {baz} from 'bar').
Hi,
I'm changing todos 'add todo' reducer to set completed to true on creation and I get:
Tested on unmodified Todo app,
Any ideas?
The text was updated successfully, but these errors were encountered: