Closed Antibioticvz closed 6 years ago
@Antibioticvz I think you should use
import getStateFromCookies from 'redux-cookies-middleware/getStateFromCookies';
or import { getStateFromCookies } from 'redux-cookies-middleware';
instead of import getStateFromCookies from 'redux-cookies-middleware';
@nimishsinghal does not work. the import getStateFromCookies from 'redux-cookies-middleware/getStateFromCookies';
does not work at all. import { getStateFromCookies } from 'redux-cookies-middleware';
the same problem. import getStateFromCookies from 'redux-cookies-middleware/src/getStateFromCookies';
and import getStateFromCookies from 'redux-cookies-middleware/lib/getStateFromCookies';
the same problem
@Antibioticvz so in the script that you shared previously, you have two imports in the beginning:
import reduxCookiesMiddleware from 'redux-cookies-middleware';
import getStateFromCookies from 'redux-cookies-middleware';
Both the statements are essentially the same. And what you will get is the middleware as a result in both reduxCookiesMiddleware
and getStateFromCookies
. Although what you intend to do in the second statement is different from the result.
The first thing you need to do is change the above snippet to:
import reduxCookiesMiddleware from 'redux-cookies-middleware';
import { getStateFromCookies } from 'redux-cookies-middleware';
This should fix the first problem that we see here. Can you make this change and try to run your script? If you don't get your expected result, please put a like this console.log(getStateFromCookies)
after your import statements and share what you are getting here?
Thanks
Closing due to no activity for a long time.
In this implementation after getStateFromCookies we have
I don't understand is it bug or my problem