Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DoctorDerek/b5bade4b2766b5f3a69127cb771689b6 to your computer and use it in GitHub Desktop.
Save DoctorDerek/b5bade4b2766b5f3a69127cb771689b6 to your computer and use it in GitHub Desktop.
What Is the Correct Type for the Children Prop in React TypeScript? https://medium.com/p/6974e82917b4
import { ReactNode } from "react"
type ILayout = {
pageInfo?: { name: string; description: string }
children: ReactNode
}
export default ILayout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment