Open tbtommyb opened 5 years ago
If you have React components that only call render you can express this more succinctly (and React runs them faster) as a functional component:
render
const BackButton = ({ link }) => ( <Link to={link}> ... </Link> );
Destructing the props argument is a super-common React pattern that can clean up your code quite a lot.
If you have React components that only call
render
you can express this more succinctly (and React runs them faster) as a functional component:Destructing the props argument is a super-common React pattern that can clean up your code quite a lot.