I am trying to pass a prop to a child component in react but its not showing up at all in props when I console log it. Even the key things
don't show up.
Any help on this will be appreciated.
export default class Child extends Component {
constructor(props) {
super(props);
console.log(props)
}
render() {
console.log(this.props)
return (
<div>
Test
</div>
);
}
}
class Parent extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<Router>
<div>
<Route path='/testing' things="yes" component={Child} />
</div>
</Router>
</div>
);
}
}
}
const connectedParent = connect()(Parent);
export { connectedParent as Parent };