0

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

但是,当将组件的类型从更改为时statelessComponentreducerComponent出现以下错误:

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
4

1 回答 1

2

解决方案发现评论是原因反应的过时副本。reducerComponent在 reason-react 0.2.4 中引入。npm update reason-react应该修复它。

于 2017-09-29T19:54:36.807 回答