Skip to content

Instantly share code, notes, and snippets.

@DoctorDerek
Created October 21, 2022 17:43
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/b74e75e76f7fc9d61c58462996709a86 to your computer and use it in GitHub Desktop.
Save DoctorDerek/b74e75e76f7fc9d61c58462996709a86 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"
export default interface ILayout {
pageInfo?: { name: string; description: string }
children: ReactNode
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment