I’m new to React, and struggling to understand this error.
I’m looking through some existing code and see this interface:
interface Props {
above?: React.ReactChild;
//...
}
ReactChild
is struck out with the message 'ReactChild' is deprecated. - This type is not relevant when using React. Inline the type instead to make the intent clear.
Looking around, it seems the fix is to replace ReactChild
with ReactNode
, but can someone explain the error please…
What does “Inline the type” mean?
Thanks!