react-attr-converter
Convert HTML attribute names to React props.
Convert how?
It converts HTML attribute names into prop names used by React.
; // => 'className'; // => 'htmlFor'; // => 'onClick'; // => 'onClick'
It bypasses attribute names which are not supported by React.
; // => 'data-hello'; // => 'lovelive'
How to use
Install with NPM:
npm i --save react-attr-converter
Import with CommonJS or whatever:
const convert = ; ;; // both of them work
A bug!
When a bug is found, please report them in Issues.
Also, any form of contribution(especially a PR) will absolutely be welcomed 🍻