Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ChildComponent.jsx - How to Pass All Props to a Child Component in React
import React from "react"
import DisplayAllProps from "./DisplayAllProps"
const ChildComponent = (props) => (
<React.Fragment>
<h1>ChildComponent's props:</h1>
<DisplayAllProps {...props}></DisplayAllProps>
</React.Fragment>
)
export default ChildComponent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment