easy-team / egg-react-webpack-boilerplate

Egg React Server Side Render(SSR) / Client Sider Render(CSR)
https://easyjs.cn/egg-react
MIT License
671 stars 93 forks source link

启用server的模式,如何进行localStorage的缓存 #42

Closed 1ib0 closed 5 years ago

1ib0 commented 5 years ago
hubcarl commented 5 years ago

@zaolunzidexiaomanong localStorage 是 纯浏览器的 API,在服务端是用不了。你可以在 componentDidMount 里面进行 localStorage 操作

https://github.com/easy-team/egg-react-webpack-boilerplate/issues/29

1ib0 commented 5 years ago

@hubcarl 好的,谢谢