在ReasonReact中找不到reducerComponent

时间:2017-09-29 17:27:09

标签: reason reason-react

我正在尝试按照Reason React tutorial来构建一个简单的TodoApp:

但是,当将组件类型从statelessComponent更改为reducerComponent时,我收到以下错误:

We've found a bug for you!
/Users/harald/projects/reason/a-reason-react-tutorial/src/TodoApp.re 8:17-44

 6 │ type state = {items: list item}; 
 7 │
 8 │ let component = ReasonReact.reducerComponent "TodoApp";
 9 │
10 │ let se = ReasonReact.stringToElement;


The value reducerComponent can't be found in ReasonReact

1 个答案:

答案 0 :(得分:2)

解决方案发现,评论是理性反应的过时副本。 reducerComponent引入了理性反应0.2.4。 npm update reason-react应该修复它。