
Styled Components v3.0.0 - stablemap
https://github.com/styled-components/styled-components/releases/tag/v3.0.1
======
wafflesraccoon
I'm a huge fan of styled components for React/Redux projects. It really makes
styling components easier while also promoting reusable code. Being able to
pass props to your styled components is a huge win too.

------
beaconstudios
I don't understand the appeal of styled components at all - what's the benefit
over simply having `import './MyComponent.scss` at the top of your file? I
can't imagine working on an app where the css is mixed directly in with the
JSX.

~~~
dmalik
I recommend giving it a try.

Few quick reasons off the top of my head. \- HMR works well \- Theming,
variables with things like ternary \- Code reuse is better (Especially with
theming) \- Component can contain everything in one file \- Extend other
components easily \- Better developer work flow \- Contained class names

~~~
dictum
> HMR works well

Have you run into problems with hot reloading of stylesheets? Seems like the
kind of problem that should be solved by now (for reference, LiveReload was
doing CSS injection back in 2011, and maybe some other tool even earlier:
[https://web.archive.org/web/20110428025941/https://github.co...](https://web.archive.org/web/20110428025941/https://github.com/mockko/livereload))

------
subbz
From the point of view of a guy who skipped the React, Angular, Vue hypes
until today:

\- Where are we going to?

\- What is the sense behind this syntax?

\- Can we go back to HTML/CSS/JS when the hype's over?

~~~
mephitix
>>a guy who's skipped the React, Angular, Vue hypes

This is the root of your consternation. Like everything in our industry -
experiment, build, then judge. I was a naysayer initially too. Then I tried
React, Redux, styled-components, etc. and now I'm a believer. Combine this
with modern CSS like Flexbox and CSS Grid and it truly is a golden age of web
development!

~~~
dc443
The single big thing that makes me go back and forth about whether I (deep
down) _like_ these systems is the surrender of control.

On the one hand: It is powerful at automating _some_ the typical tedium you
always have. It gives you a better chance to end up with a decent view model,
by forcing it upon you.

On the other hand: You lose control. Almost always you can gain it back, but
it is an uphill battle. If you know you need low level control (for example
over complex animations and interactions in your UI) you've got to think
carefully.

It all comes back to perspective. As an interaction engineer I really hate the
process of trying to make a specific animation work the way I want inside of a
React managed DOM. As an application developer, the purity of the approach is
extremely attractive.

Also I must brush up on Grid. It's about time we got rid of god damn tables.

~~~
mephitix
I agree, that's why I like styled components so much. It's all based on
vanilla CSS - there's no new syntax. I use animations, pseudo-classes, etc all
with styled-components. Animations with react are cumbersome. So I try as much
as possible to fall back to CSS animations - they yield better perf anyway.
With styled components this becomes easier since you can have CSS values
derived from React props.

------
magnetic
If you want to know what this is, follow [https://www.styled-
components.com](https://www.styled-components.com)

I was a bit confused when I followed the HN link originally.

------
adamsea
As someone who looked at using styled components for a small project, but
chose JSS (despite liking styled components) for various reasons, I would love
to hear from someone with experience with both styled components and JSS -
what do styled components offer which JSS does not, or, why would you choose
one over the other?

------
yesimahuman
This seems to be react only? That bit of information is buried. Seems like a
good opportunity to release a web component library for the whole web dev
ecosystem.

~~~
bdcravens
Angular has this baked in (can't speak to other frameworks)

------
angry_napkin
I really enjoy using this library. Thank you team!

------
incadenza
Anybody have an idea what the exciting new features they’re planning are?

~~~
mxstbr
Yeah, I do! ;-)

\- Performance performance performance (expect some news on that front soon)

\- Streaming server-side rendering support

\- A better global CSS API that allows you to use your theme dynamically

\- babel-macro mode

