Answer the question
In order to leave comments, you need to log in
How to destructure props in React?
Props come from store.js. But it is not possible to destructure (or destructure) them.
Here is what is stored in props:
state = {
inner: {
param1: 'text',
param2: 123
}
}
const App = ({ param1, param2 }) => { // props.state.inner.param1
// undefined
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question