The TweetComponents type is used for the components prop on both Tweet and EmbeddedTweet. It has an optional slot for providing a TweetNotFound component, but TweetNotFound is only ever used by Tweet, not EmbeddedTweet.
IMO it is confusing to allow a prop to be passed to a component that is never utilized. I can see a consumer passing something to that slot, expecting it to do something. I think a better design would be to maintain separate types for the components prop of Tweet and EmbeddedTweet.
The
TweetComponents
type is used for thecomponents
prop on bothTweet
andEmbeddedTweet
. It has an optional slot for providing aTweetNotFound
component, butTweetNotFound
is only ever used byTweet
, notEmbeddedTweet
.IMO it is confusing to allow a prop to be passed to a component that is never utilized. I can see a consumer passing something to that slot, expecting it to do something. I think a better design would be to maintain separate types for the
components
prop ofTweet
andEmbeddedTweet
.