12

One day my colleague says that React Js is used for frontend as well as backend. I did not agree with him also he blames that Backend API’s also can be created using React Js. I could not believe because as per I know React Js is a library for frontend not for Backend. Still, some other colleagues supported him because he is the senior developer I am an intermediate developer.

Then I ask some of my friends who are currently working on React Js, Can we use React Js for the backend? And the next day I went office and talk to my colleague that I could not found that React JS can be used for backend and backend API. And he replied You can use nodejs. Oh! Man But I think Node and React are different tools.

Comments
  • 1
    https://reactjs.org/docs/... not sure if this is what he was talking about but you aren't entirely correct about React only being a client side library
  • 2
    I never heard about that. Ask him to write a tutorial about it and share with the world.
  • 1
    From my point of view,you should apologize to your mentor.
    React can be used as a server-side library in Node.JS for server-side React rendering and delivery of a react app to your customer.

    On the other hand, since React has no "run as a server" mode, react is not able to serve an api route on it's own.

    There is still a Node.JS Webserver required to do that.
  • 0
    @beegC0de Hmm... yeah you are correct, But we need nodejs for the server part right?
  • 1
    @nanl I requested the same but he argues that he doesn't have much time for it. The debate started because he said Ruby on Rails will be replaced by React Js very soon and I m currently working on RoR. After few days, he mentioned Node Js
  • 0
    @TylerDDevRant Thanks for providing such a great insight into the issue. I was not much confident about it, Now I got it :)
  • 1
    Yes let's use JavaScript on a server that assumes every task is async. While we're at it, why don't we eat paint.
  • 2
    Sorry my comment took so long to post, I was busy requiring 140 packages to complete it.
  • 0
    Hi @dangerzone, why you were busy requiring 140 packages to complete it? Could you please explain about it?
  • 2
    @madhusudhan
    You're welcome :)
Add Comment