Hi everyone on my current job right now as a front end developer, my lead developer ask me to create a skeleton fallback components integrating the Skeleton component from MUI.
On every fallback component I created I always imported Skeleton component from MUI. But my lead told me to create a dumb component which encapsulates the Skeleton component and pass the same props as the Skeleton component from MUI and instead of using the Skeleton component from MUI I should use the dumb component I created.
So basically I just created a copy of the Skeleton component from MUI.
Are there any benefit of doing it?
Sample code
import { Skeleton } from "mui/material"
export const OurSkeletonComponent = (props) => <Skeleton {{...props}} />
Top comments (0)