Harald Harald - 3 years ago 144
React JSX Question

reducerComponent can't be found in ReasonReact

I'm trying to follow this Reason React tutorial to build a simple TodoApp:

However when changing the type of the component from

I get the following error:

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

Answer Source

Solution found n the comments to be an outdated copy of reason-react. reducerComponent was introduced in reason-react 0.2.4. npm update reason-react should fix it.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download