A
A
Andrew_qwer2018-04-09 18:52:41
MongoDB
Andrew_qwer, 2018-04-09 18:52:41

Combining react and mongodb?

Installed create-react-app, how to make routes like
app.('path',function(){
connect to mongo;
get data from mongo;
ReactDOM.render(, document.getElementById('root'));
})
can this be done in the src>index.js file?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Aleksandrovich, 2018-04-09
@RomReed

Do you want to use side rendering server?
The easiest way to pass node data to react is to write an api and from react knock on it and pull the necessary data

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question