-
Hey there, Could you explain why we use Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
timlrx
Dec 17, 2021
Replies: 1 comment
-
That's because in the subsequent line we are defining a new image component As to why there is this additional level of abstraction, it's mainly to facilitate those trying to create a static build since they can swap out |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
rsipakov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's because in the subsequent line we are defining a new image component
const Image = ({ ...rest }) => <NextImage {...rest} />
and there would be a clash in the names if the import was also calledImage
.As to why there is this additional level of abstraction, it's mainly to facilitate those trying to create a static build since they can swap out
NextImage
forimg
.