I hate to say this, but it feels like the same old arguments that people used for HTML in Java…
Michael Ross Havard
394

I have been working with react for about six months now and I think it is way more enjoyable and useful than Angular.

Regarding reusability; components are way more reusable (when you do it right) with React. In the case of the address, thats easy. In React you pass in props to the component to get rendered, and then you use regular JS to insert it into the “HTML” (JSX) If the data has a different shape then you might have to normalize it somehow. I’m not aware of any rendering framework or library where you wouldn’t have to normalize data that comes in looking differently to be able to reuse the template. With React you can do choose to do things however you want, as long as its valid Javascript. It feels liberating.

it could look like this: https://jsbin.com/hijazosoxu/edit?js,output if it got more complicated instead of doing that in the rendering function you would make a separate function to prepare the data and call it during render. Or if using es6 syntax you can just make a component that is a subclass.

There are plenty of good plugins for every editor that do completion and validation. As the author mentioned React will actually throw errors too if the HTML isn’t valid.

I hope I never work somewhere where designers write HTML. This is an uninformed opinion but that just sounds like I would receive it and; React or not would end up rewriting tons of it anyways. JSX is basically HTML so you can just copy chunks of regular HTML into the relevant components and replace the few attributes that are different. Easy as pie.

I will debug a React app any day over an Angular app, and a hundred times over an app using JQuery for everything :P

Just give it a try! it doesn’t take long to learn and will be worth it.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.