Destructure Variables As Props To A Component
When passing down props, a redundant-feeling pattern can sometimes emerge.
The typing feel duplicative, as if there ought to be a better way. One option is to simply pass down all the props:
This approach may result in passing down props that we don't intend to pass down and clutters the flow of data in our app.
Here is another approach:
h/t Vidal Ekechukwu
Last updated
Was this helpful?