You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 1, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 1, 2022. It is now read-only.
How to make express-react-views and the frontend react component work together? #54
I used to use Jade as my Views engine, now I change it to express-react-views.
Everything runs ok, but I got a problem....and it makes me confused.
For example, I make a layout component from the server side and store it in views folder and then make an other frontend component by using the frontend react and store it in public folder.
Now the problem hits....I can not render the frontend component when I put it into the server side layout component.
How can I fix it?
urgently~~
express-react-views doesn't seem to be meant to use react "as intended." It's more so that writing the template for the html document can be done using something you're comfortable with: react components. Stuffing the template with the react markup and then binding on the client-side is the intended way of using react and is independent of this. Doing both just has the added benefit of always writing markup the "react way," though you should be conscious of what is within your react "app" and what is part of the template.
Reacted by Marco Salazar de Leon, Zach Sosana, Phil Jory, Andrej Badin, Govind Rai and dylanlesterew
Activity
joephon commentedon Oct 22, 2015
Oh I C...once I use React as my server side views engine...I dont need frontend react component any more..........................
saiichihashimoto commentedon Feb 12, 2016
express-react-views doesn't seem to be meant to use react "as intended." It's more so that writing the template for the html document can be done using something you're comfortable with: react components. Stuffing the template with the react markup and then binding on the client-side is the intended way of using react and is independent of this. Doing both just has the added benefit of always writing markup the "react way," though you should be conscious of what is within your react "app" and what is part of the template.