0

I am wondering if we are able to combine express.js with React.js, specifically with templating.

I have tried several packages like express-react, either it is giving up react and it's webpack features, or it is giving up templating that allows me to customize rendering based on user's information.

Do we have a easier method to render react on an express server? And supporting templating in an express fashion?

1
  • I don't understand the question, they're both completely different libraries. Commented Sep 18, 2017 at 4:40

1 Answer 1

1

React is a library for build views in a Single Page Application (SPA). A SPA, by definition only has one page served from the server. You can think of this page as the page you build in express with templates.

Express is only used as an API server for a React SPA.

What you may be looking for, though, might be server side rendering a React App, but this is an advance topic even after you are familiar with React:

https://github.com/reactjs/redux/blob/master/docs/recipes/ServerRendering.md

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.