scoped
scoped copied to clipboard
Tip for making this work in React
If anyone is using this in React, here's how you get React's HTML manipulation to work nicely with this library:
<style scoped key={styleString}>
{styleString}
</style>
Thanks! I might add this in the README.
If anyone is using this in React, here's how you get React's HTML manipulation to work nicely with this library:
<style scoped key={styleString}> {styleString} </style>
Great tip, spent 2 days trying to figure out how to inject scoped style tag in a React library, and couldn't make this work.
@samthor: Definitely add this to the README or it won't work on React, while it works perfectly with a unique BUT also dynamic key attribute.