jed_watson
Joined 13 years ago
Joined 13 years ago
The most likely outcome will be to go with the "css in components" approach (w/ Radium, I expect) and maybe a base / "foundational" optional stylesheet for typography / etc. Still working it out though - all today's viable approaches have lots of pros and cons.
We're actually developing it first and foremost for use in Keystone's Admin UI - we needed a robust and flexible css + component library for that, which users could extend & build plugins on, so we started building one.
More specifically, we're not porting Bootstrap to React but building React-specific components from scratch to fill the same gaps.
Something in particular we're focusing on is building a modular IU toolkit - so you could use all of Elemental, or just our select component / buttons / date picker / etc; all of which would be available as standalone packages on npm, but can leverage a consistent thumbing system and play nicely together.
(And yes - we'll fix that modal issue soon with a pure css approach; a community member wanted to implement it with JavaScript but it hasn't worked out well)
We're actually experimenting with deprecating access to classes (i.e exposing components rather than class names as the public API) - will be interesting to see how popular that approach is.
2. LESS has been our favourite pre-processor for a white but we're finding it doesn't play well with packaging modular components on npm. Some real limitations around the @import logic, and the core team refuse to make it to work with node-style require path resolution which is disappointing.
From here I think it's more likely we go with the "styles in components" approach (via Radium or similar) and make variables / themeing available via context. Much easier to package & use "out of the box". Might keep a "base" css include though, or possibly use the Bootstrap 4 "Reboot". The distinction between, and best way to package, component styles and page styles is something we're putting a lot of thought into!
imo JSX doesn't fall into this trap, it just looks like it should.
His JSConf EU talk is worth a watch if you're interested: http://2013.jsconf.eu/speakers/pete-hunt-react-rethinking-be... (slides: http://www.slideshare.net/floydophone/react-preso-v2)
That's also a very effective solution for low-traffic sites with a modest amount of host-side processing and more than enough for one sale a minute.
It's got great options for 3rd-party service integration too (e.g. free MongoDB hosting for < 512mb with MongoLab), and a very node.js friendly environment / deployment workflow.
Not trolling, genuinely curious what the benefit of this would be as an alternative.
There's a Cordova project that builds for iOS in the sample project if you're interested.
Down the track it will including a theme capability and a more Android-friendly UI style, I'll add something to the roadmap to make this clearer.