Live data from Hacker News

My Reaction to React

pseudoconcurrentthought.wordpress.com

1–10 of 147 posts

Re: My Reaction to React

#2
The first Javascript post I enjoyed reading, this looks simple for humans like me. It is more readable and more understandable. You should write more Javascript tutorials and show that things don't have to suck. This is how I should have started learning Javascript. I bet the time lost in not using a framework is gained with a better understanding of what is happening and also with an absence of imposed conventions. Just my 2 cents

Re: My Reaction to React

#3

The first Javascript post I enjoyed reading, this looks simple for humans like me. It is more readable and more understandable. You should write more Javascript tutorials and show that things don't have to suck. This is how I should have started learning Javascript. I bet the time lost in not using a framework is gained with a better understanding of what is happening and also with an absence of imposed conventions.…

Yes and no.

Homerolled solutions such as this are free of another developers assumptions, but tend to scale poorly. Generally they need to be modified as new requirements are created, or unforeseen circumstances arise.

Over time you end up putting together more and more logic in and the illogical conclusion is that you end up building your own heavily bespoke version of React/Angular/jQuery/whatever, before realising you actually need to go back and start again.

There is absolutely nothing wrong with writing your own libs (it's educational and character building!) but to chuck json through a constructor is trivial. Sure - this code renders views in a simple and relatively inefficient way, but drawing boxes is only part of what React is doing.

Re: My Reaction to React

#4

The first Javascript post I enjoyed reading, this looks simple for humans like me. It is more readable and more understandable. You should write more Javascript tutorials and show that things don't have to suck. This is how I should have started learning Javascript. I bet the time lost in not using a framework is gained with a better understanding of what is happening and also with an absence of imposed conventions.…

I must agree. Starting with jQuery is becoming more and more common, you get immediate results but don't know WHY and HOW it involves Javascript. Breaking it down into pure JS like this is great.

Re: My Reaction to React

#5
Okay I think the author is severely misinformed as to why we use React. I say this because the very first thing he says is to use MVC architecture and then goes on to write his own framework (from scratch???????)

...Why?

This solves none of the problems React was designed to solve and only makes things more complicated by introducing new APIs only you know.

Yes, this approach with vanilla JS is great for small apps. What makes you think this app won't grow?

I hardly see how this is a reaction to React other than to say "I didn't really read into why people are using React or what it's trying to solve, but I'm pretty sure I can solve this problem with my own framework I just whipped up.

Sorry for the brash delivery.

Re: My Reaction to React

#6
post #3

The first Javascript post I enjoyed reading, this looks simple for humans like me. It is more readable and more understandable. You should write more Javascript tutorials and show that things don't have to suck. This is how I should have started learning Javascript. I bet the time lost in not using a framework is gained with a better understanding of what is happening and also with an absence of imposed conventions.…

Yes and no. Homerolled solutions such as this are free of another developers assumptions, but tend to scale poorly. Generally they need to be modified as new requirements are created, or unforeseen circumstances arise. Over time you end up putting together more and more logic in and the illogical conclusion is that you end up building your own heavily bespoke version of React/Angular/jQuery/whatever, before realising…

I totally agree with you on the scalability aspect, but I think one of the main issues correctly pointed out by @ilovefood is that a lot of juniors nowadays start directly with one of the big frameworks, with no idea on what vanilla JS is.

I really hoped that we learned something from the jQuery experience but it seems to happen again and, maybe this is just my feeling, but JavaScript is kind of the only big enough language with this issue.

Re: My Reaction to React

#7
Components are easy. Just write a function...

Until you want to automatically unregister event handlers when the component is removed

Until you want to compose them and select child and parent components without traversing the DOM

Until you want to pass options to the components in various ways, and have default values for them

Until you want to store component state and re-render part of the component whenever something in the state changes (since storing state in the DOM and reading it from there is bad)

Until you want to load javascript files on demand to construct and manage components instead of loading everything in one huge js file up front for a big website

Until you want to have a unified CSS convention so you can style all these components

That's when you need a well tested framework.

Re: My Reaction to React

#8
post #5

Okay I think the author is severely misinformed as to why we use React. I say this because the very first thing he says is to use MVC architecture and then goes on to write his own framework ( from scratch??????? ) ...Why? This solves none of the problems React was designed to solve and only makes things more complicated by introducing new APIs only you know. Yes, this approach with vanilla JS is great for small apps…

I'm not really fighting you on the merits of frameworks (which should be obvious to everyone), but are you implying that implementing a design pattern is equivalent to building a framework?

Re: My Reaction to React

#9
I went down a similar path a few years ago when starting a new project. Instead of learning a new framework I wrote my own. It took less time overall, since the logic wasn't especially hard to write, and it was easier to debug - at first. Everything changed as soon as another developer, then two, then three, started working on it with me. They were not happy about learning how to use my custom MVC framework.

Perhaps the most valuable thing about frameworks is that they are common languages. They make it easier for developers to dive into a new code base and quickly understand what's going on. It's not entirely about functionality. I think this is partly why framework usage seems to be so trend and style driven; everyone wants to be using what everyone else is using.

Re: My Reaction to React

#10
post #6
post #3

Earlier quoted context omitted.

Yes and no. Homerolled solutions such as this are free of another developers assumptions, but tend to scale poorly. Generally they need to be modified as new requirements are created, or unforeseen circumstances arise. Over time you end up putting together more and more logic in and the illogical conclusion is that you end up building your own heavily bespoke version of React/Angular/jQuery/whatever, before realising…

I totally agree with you on the scalability aspect, but I think one of the main issues correctly pointed out by @ilovefood is that a lot of juniors nowadays start directly with one of the big frameworks, with no idea on what vanilla JS is. I really hoped that we learned something from the jQuery experience but it seems to happen again and, maybe this is just my feeling, but JavaScript is kind of the only big enough l…

Can't blame the tools for a lack of decent developers any more than you can blame a spell checker for illiteracy.
Post reply on HN