MCPcopy Create free account
hub / github.com/epicweb-dev/react-suspense / ShipImg

Function ShipImg

exercises/06.optimization/02.problem.cache/index.tsx:210–218  ·  view source on GitHub ↗
(props: React.ComponentProps<'img'>)

Source from the content-addressed store, hash-verified

208}
209
210function ShipImg(props: React.ComponentProps<'img'>) {
211 return (
212 <ErrorBoundary fallback={<img {...props} />} key={props.src}>
213 <Suspense fallback={<img {...props} src={shipFallbackSrc} />}>
214 <Img {...props} />
215 </Suspense>
216 </ErrorBoundary>
217 )
218}
219
220function Img({ src = '', ...props }: React.ComponentProps<'img'>) {
221 src = use(imgSrc(src))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected