在 ReasonReact 中找不到 reducerComponent

reducerComponent can't be found in ReasonReact

我正在尝试按照此 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

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