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 Jan 11, 2019. It is now read-only.
exportdefaultclassMainextendsReact.Component{constructor(props,context){super(props,context);console.log('Main props',props);console.log('Main context',props);}/** * componentWillMount() runs on server and client. */componentWillMount(){if(__SERVER__){console.log("Hello server");}if(__CLIENT__){console.log("Hello client");}}/** * Runs on server and client. */render(){return(<App/>)}}
My attempt is to load <RightContent /> dynamically to a click event generated by <Sidebar/> component, that contains a list of <Link to=".." >. I think the basic problem is that props from Main are not passed through children. Can anyone help me, please? Thank you.
Hi there!
This is a question from a noob. My project structure is the following:
routes.js
Main.js
App.js
My attempt is to load
<RightContent />dynamically to a click event generated by<Sidebar/>component, that contains a list of<Link to=".." >. I think the basic problem is that props from Main are not passed through children. Can anyone help me, please? Thank you.