Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That looks a lot like the element builder function that Fastmail put together back in 2012.

https://blog.fastmail.com/2012/02/20/building-the-new-ajax-m...

I too am fond of that approach.



Yeah, same idea.

The dream that designers, being comfortable with HTML, would be able to mess around with JSX is, as far as I can tell, unrealistic anyway, because it's always full of React-specific weird stuff that the designer doesn't understand and doesn't want to mess with.


You should separate your Presentational and Container components [0]. Presentational components can be pure and stateless, containing no/minimal React-specific weird stuff - that should go into the Containers.

[0] https://medium.com/@dan_abramov/smart-and-dumb-components-7c...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: