ReasonReact label “for” attribute — How to

Kevin Simper
1 min readAug 26, 2018

If you try to make a label in ReasonReact with the for attribute, you will get a error even if you try to change it to for_ like the type_.

This way does not work:

<label for_="firstname"/>

The correct way is using htmlFor:

<label htmlFor="firstname"/>

This blogpost is because I did not find a immediate search result for “ReasonReact label for” and I think this small things are important to have documented in easy to find way!

--

--

Kevin Simper

I really like building stuff with React.js and Docker and also Meetups ❤