react-express icon indicating copy to clipboard operation
react-express copied to clipboard

Are inline styles a good fit for a beginner guide?

Open gaearon opened this issue 7 years ago • 1 comments

There is a myth that React requires using inline styles, and IMO this guide might confirm this idea for people who aren't experienced with React.

Would it be better to use plain CSS for learning? I understand the advantages of using a single file in examples, but it can hurt perception of React's flexibility.

In addition, inline styles implemented naïvely as objects have performance issues.

gaearon avatar Jun 26 '17 16:06 gaearon

There is a myth that React requires using inline styles

Even when I started learning react.js, I had the same opinion, but then it will take a while for any person to understand what the whole concept of React.

IMO this guide might confirm this idea for people who aren't experienced with React.

IMO, I don't find any need of inline styling in react.

Would it be better to use plain CSS for learning?

Absolutely. Without any doubt. Since that is the classic way which everyone got used to for a long time. And with this, there is no confusion at all.

Inline styles implemented naïvely as objects have performance issues

How can that affect the performance? Is it the bundle size & loading time?

reznord avatar Jun 27 '17 06:06 reznord