DailyJS

DailyJS

The JavaScript blog.


Tagcommunities
Featured

libraries react communities

ReactShadow, npm Subreddit

Posted on .

ReactShadow

If you use React but would rather put CSS in separate files, then now you can with Adam Timberlake's ReactShadow (GitHub: Wildhoney/ReactShadow, License: MIT, npm: react-shadow, Bower: react-shadow).

With ReactShadow you can apply a Shadow DOM root inside of your component. Under normal React.js conditions, your styles are written inline for style encapsulation – with ReactShadow your styles can now be moved into their rightful place – within CSS documents!

There's a demo of ReactShadow that displays a few simple section elements that are styled using CSS files. The files specific to each section are loaded with @import using style elements. This works by declaring a cssDocuments property on the relevant react classes. It seems easy to use and potentially better than using inline styles, particularly if you've got existing stylesheets.

npm Subreddit

Daniel Bugl sent me reddit.com/r/npm, a subreddit all about Node modules. I receive lots of Node modules to write about on DailyJS but I don't have time to cover everything, so it's a good idea to post them places like this as well.

Another good way to promote your modules is EchoJS. I find it useful for getting a shapshot of the community right now -- recently it's all been about the Node/io.js drama.

You should always share your JavaScript projects. The old adage "if you build it they will come" is complete nonsense, don't be afraid to promote things you've worked hard on!