NodeJs w/templating engine or ReactJS

Hi,

So, been spending my time on NodeJS and had the following question. Is ReactJS simply an alternative to NodeJS with a templating engine (e.g, pug, ejs, handlebars)? Yes, I know this is very simplified, but is that pretty much the difference? I’m trying to decide which I should be spending my time on. Perhaps they can be used together??

Thanks,

Is ReactJS simply an alternative to NodeJS with a templating engine

Nope o.o
React is a front-end library. It gives you the ability to interact with the DOM in a different way, much more reactive and to write js in a different way, more ‘natural’ (you use one single html file where you inject components, and you can write self-contained components to use them wherever you want). It come with a lot of other fancy stuff but these characteristics are the more evident ones i think^^.
Nodejs is ‘something’ that let js works out of the browser. Is something totally different.

That said you can use both to render html pages but obviously what an aimed front-end library can do is much more than what a template engine could ever image :stuck_out_tongue:

Perhaps they can be used together??

They are usually used together but they are used to achieve different tasks: with react you manage the front-end stuff, when it comes to the backend story it’s time to warm up your node skills :wink:

1 Like