M
M
mishapsv2016-01-19 14:45:27
React
mishapsv, 2016-01-19 14:45:27

Why can checkbox not fire (does not change state) in React?

The layout block was rewritten into a component. In layout, the checkbox works, in jsx it doesn't.

<input id="bet-prepay" name="prepay" type="checkbox" />
<label for="bet-prepay">Предоплата</label>

Those. it doesn't change visually.
What could be the reason?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
1
123 123, 2016-01-19
@mishapsv

An attribute foron an element labelin JSX must be written as htmlFor. Here is a list of all tags and attributes in JSX: https://facebook.github.io/react/docs/tags-and-att...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question