Skip to content
This repository has been 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

Open
joephon opened this issue Oct 22, 2015 · 2 comments

Comments

@joephon
Copy link

joephon commented Oct 22, 2015

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~~

@joephon
Copy link
Author

joephon commented 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
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants