Benjamin Li Benjamin Li - 5 months ago 70
React JSX Question

In React with Redux, newTodo without value

I am looking at this redux example, and find one strange code:

<TodoTextInput newTodo
placeholder="What needs to be done?" />

why the newTodo does not have any value? then what value is passed to the component?



newTodo is a boolean

When no value is set it's the same as doing newTodo={true} since obviously if it wasn't there it would be false.