bootstrap-v4-snippets
bootstrap-v4-snippets copied to clipboard
Support JSX
Hey @jordanbtucker,
In order to implement support for JavaScript React (jsx) language I'd need some testing from your side as I'm not familiar with that language and I can't validate if the snippets are compatible with it.
In visual studio code open user snippets (https://i.imgur.com/GvJU9z3.png), select jsx language and in the newly opened file paste snippets code from https://github.com/Zaczero/bootstrap-v4-snippets/blob/master/bootstrap-v4-snippets/snippets/snippets.json
Then just save the user snippets and test if everything works fine with jsx files 😃
@Zaczero First off, thank you for making these snippets, they are very helpful!
For JSX compatibility there are a few issues.
- Self closing tags cannot be left open, <br> throws errors, <br /> will not.
- Instead of class="btn", className should be used so className="btn".
- The for attribute should be converted to htmlFor.
I've just started using your snippets but those are the first issues I've noticed so far.
* osing tags cannot be left
Thanks for the details, I'll implement those changes and add the JSX support in free time :-)