Using React with ejs?

前端 未结 1 919
你的背包
你的背包 2021-02-10 01:55

I have a front-end that is built using React states that is meant to adapt based on user action. However, my front-end React is also meant to show and allow manipulation of my s

1条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-10 02:17

    In express:

    res.render('view', {user: myUser});
    

    In EJS before the app's js bundle:

    
    

    Use userFromServer in your react code.

    0 讨论(0)
提交回复
热议问题