News for hackers. Stuff that matters.
Re:Fix CSS by writing it in JavaScript by oleg009 on Tuesday November 25, 2014 @02:36PM (#8659282)
Thanks Cheng, you nailed it. Jss was actually inspired by your RCSS idea, I just wanted a different implementation. So thank you again.

Some people here assume that I am stupid and didn't learn the css basics. This is just funny.

Re:Fix CSS by writing it in JavaScript by chenglou on Tuesday November 25, 2014 @02:44PM (#8659317)
Glad you did! I'm not entirely satisfied with my API but the idea's there, so very cool to see someone make something better out of it.

These kind of things will receive lots of oppositions at first, but once you know the basics are right (e.g. trivial mapping from js obj to css) and build on top of it, this is bound to take off one day like JSX did =).

Re:Fix CSS by writing it in JavaScript by malandrew on Tuesday November 25, 2014 @05:31PM (#8660154)
I don't get JSX, especially now that 0.12 requires you to use createFactory (a big improvement over the old API) to encapsulate all the static JSX parts. With JSX, you're losing all the things that make having a proper programming language useful.

Have you given react-hyperscript a chance? https://github.com/mlmorg/react-hyperscript

Having first class functions for creating DOM makes it much easier to keep your DOM state creation dry. It's more tedious if you use it just like JSX, but if you recognize where you are repeating yourself over and over again, it's trivially easy to write functions that encapsulate all the repetitive structures in your HTML.

Furthermore, you don't completely break all the tools out there like eslint and whatnot. The h-script blends really nicely with solutions like RCSS and JSS.

Re:Fix CSS by writing it in JavaScript by danabramov on Friday December 05, 2014 @07:31PM (#8707807)
Linting has not been an issue for a looong time since you can just lint the output of the transform. And designers love JSX, and having designers feel confident working directly on components saves huge amount of time.
Re:Fix CSS by writing it in JavaScript by oleg009 on Tuesday November 25, 2014 @02:50PM (#8659343)
Definitely!