ReasonReact label “for” attribute — How to

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!

Written by

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

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store