4 ms·
haha, I read this too. And I thought so too. I'm using React for 1 1/2 years now and I have to admit it has its pitfalls but co-locating templates and code re
by k__ 10y ago
haha, I read this too.
And I thought so too.
I'm using React for 1 1/2 years now and I have to admit it has its pitfalls but co-locating templates and code really made things easier.
The only problems I had was when I tried to push props too far down (== not co-locating) because then my components relied on each other too much.
But most of the time the top of the file is controller code and the bottom (render method) is view code.
Often I just use props for IDs or push "full data" into tightly coupled components (list items in a list etc.)
If a component is responsible for all its data, it can be moved around freely, which often saved me many hours.
I think React has its problems, but THIS is none of them.