The React way of separating design concerns from logic is to build container components[1] that handle the logic and pass props down to simple components that just display the data they're given. I would expect designers to spend more time in presentational components and CSS modules[2] while developers would build container components. (I'm a one-man shop doing both.)
[1] https://medium.com/@dan_abramov/smart-and-dumb-components-7c...
That's a bit of a stretch though, we've had good success with using normal CSS files, included in each component with webpack CSS-loader[1]. CSS is displayed in head as needed, but without an all-JS approach like this
I'm not just being silly either. Separation of technologies (e.g. HTML/CSS/JS) is just one of many ways of splitting things up. The component paradigm is essentially a fractal version of separating by feature. Ultimately it's an architectural choice and as such any best practices should be strictly scoped to the problems they're solving.
The reason why many of us in React-land are looking to bring everything related to a single component into one file, is maintainability and strict encapsulation. Some of this is to do with developer-experience (DX), i.e. adopt patterns that make our lives easier and ultimately minimise hard-to-fix bugs. But we're also trying to adopt patterns that benefit the user (i'll be the first to admit we're not there yet). To that end, a component architecture also makes it easier to let build tools automatically take care of the nasty problem of making sure users only download exactly what they need for what they've asked to do.
I never thought there was a separation between JS and CSS, that sounds a little outdated, to be honest. As a front-end developer, I would be expected to do JS and CSS.
(Not agreeing with this BTW, but there is a subset of developers who seem to think this is just great.)
I personally like this way better, easier to find when need to fix something.
Usually React+Redux project min + gz will come in around 200-300KB for a relatively simple app... If you go with preact, and are really judicious in what you bring in, you can hit half that. For most people, if your initial send is under 500kb, it won't be noticed except some mobile connections.
YMMV of course, for comparison, angular apps tend to be about 50-80% bigger, and ng2 apps over twice the size. At least from my own experience and setting up a few boilerplate apps.
What stuff are you bringing in? Preact is 3kb, Redux + bindings for Preact probably bring it around 10kb or less (compressed). Unless you mean images and stuff.
The author either didn't do the best choice in writing his page, or has great plans for it.
[1] https://webpack.github.io/docs/configuration.html#devtool
Even if compressed and minified, that's still a huge amount of JS statements that the interpreter has to go through.
I'm getting about 2 seconds to DomContentLoaded on my iMac and a reasonably fast cable connection. Four seconds to visible content on my Nexus 5X on same connection.
This is the kind of crap that makes the web feel so lame and clunky on mobile (and on desktops too even sometimes).
While 700 Kb is sort-of-acceptable in terms of data usage, the execution of 2.8 Mb of JS is quite taxing on the browser: on my 2010 MacBook Pro it takes 4-5 seconds to show the text on the page, even when bundle.js is cached...
I found it to be a great middleman between CSS and JS, with full CSS support.
We have a project like that one of our developers wrote except it will compile the classes back to a CSS stylesheet for you for performance and will unify identical styles to not have duplicates and save space https://github.com/Mosho1/react-style
It's also nice to be able to use classes and integrate with CSS seamlessly when you need to.
vs
<span style={ styles.button }>