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
In express:
res.render('view', {user: myUser});
In EJS before the app's js bundle:
<script type='text/javascript'> var userFromServer =<%-JSON.stringify(user)%> </script>
Use userFromServer in your react code.
userFromServer