A
A
Alexander Knyazev2016-08-11 17:52:43
JavaScript
Alexander Knyazev, 2016-08-11 17:52:43

React+Express. How to use together?

I was given a task - to write an application in Express using React. Separately, I read about these technologies, did something with them, it was time to combine them, and then the question arose:
You need to connect React as a library to regular html (say, main.html) or jade, also connect js files to which I Will I import components and render them
or
use modules from npm that allow me to use jsx files as a view?
I have a feeling that I'm not thinking the right way at all. Help me sort out this mess in my head, please.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
theWaR_13, 2016-08-11
@theWaR_13

The easiest way for you is to google react starter kit, go to a repository with a normal number of stars, clone it and follow the instructions. React and Express are already built into them, and a bunch of other useful modules needed during development. Start with this, then figure it out yourself and make your own build.

D
Deodatuss, 2016-08-11
@Deodatuss

first write an application in React with fake data that arrives by timeout, then, when everything is ready, hook it up to the rest api on express. It will be easier and faster, because you already know exactly what data is needed and in what form.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question