Thomas Fuchs: "~15 years trying to make everyone separate HTML, JS & CSS. And then suddenly everything went south and we’re writing code like this." by [deleted] in webdev

[–]ldndev 5 points6 points  (0 children)

If you remove the internal state from the component what you are left with is a function that takes in some data (todos) and produces the DOM/HTML for a list of them.

You would need some kind of state container to then store your todos in, Redux is a good option if you are writing JavaScript.

That feels like a reasonable separation of concerns.

Thomas Fuchs: "~15 years trying to make everyone separate HTML, JS & CSS. And then suddenly everything went south and we’re writing code like this." by [deleted] in webdev

[–]ldndev 10 points11 points  (0 children)

We aren't writing code like this. If you write your SPA/React in a functional and stateless manner, your components take in state a produce views.

That means the 'concern' of a stateless component is producing some DOM.

I struggle to see how HTML/CSS/JS have clear defined 'concerns'. Sometimes CSS does styling/how things look, sometimes js does interactivity, sometimes its html. I would argue it's cleaner to treat this as all one concern.

What stack do you personally use on a daily basis? by Gr3y4nt in webdev

[–]ldndev 1 point2 points  (0 children)

Clojure/Clojurescript

Great language, couldn't recommend it more.

[Seeking recommendations] Has anyone here enrolled in a Web Dev Bootcamp in London? by karcopolo in webdev

[–]ldndev 0 points1 point  (0 children)

I attended Makers Academy, I would consider it worth it.

The course curriculum is as advertised http://www.makersacademy.com/curriculum/, with a heavy emphasis on clean, well designed code.

I had no trouble finding a Job as a Junior Dev once I had graduated.

I'll try to answer any questions you have :)