【问题标题】:How to make the redux-saga values display on the screen [NextJS Redux-Saga]如何让 redux-saga 的值显示在屏幕上 [NextJS Redux-Saga]
【发布时间】:2019-05-21 12:33:04
【问题描述】:

在 NextJS 中使用时,我无法使用 NextJS github 中提供的示例配置 Redux Saga。

我将代码放在沙箱中,供任何可以帮助我的人使用。

https://codesandbox.io/s/next-woi1k

我需要的信息在 redux_clock.js 页面的 URL:

https://woi1k.sse.codesandbox.io/redux_clock

如果我在 ComponentDidMount 中获取 redux-saga 信息,我可以在屏幕上显示 redux-saga 值,但是如果我在 getInitialProps 中搜索正确的 NextJS 信息,它不会显示在屏幕上。

【问题讨论】:

    标签: reactjs redux-saga next.js


    【解决方案1】:

    我能够解决我的问题。

    新reducer的初始状态丢失了。

    【讨论】:

      猜你喜欢
      • 2019-08-02
      • 1970-01-01
      • 1970-01-01
      • 2021-02-20
      • 2017-05-28
      • 1970-01-01
      • 1970-01-01
      • 2018-03-16
      • 2017-11-14
      相关资源
      最近更新 更多