Any tips on how to load components dynamically? I'm trying to create these aquarium components with jsx props.
Doing this to get it loading on localhost but what changes should I make to get the component available at _astro/component when its deployed?
{fish.map(fishName => {
const FishComponent = React.lazy(() =>
import(`./${fishName}.jsx`)
);
return <FishComponent key={fishName} />;
})}
{decor.map(decorName => {
console.log(decorName);
const DecorComponent = React.lazy(() =>
import(`./${decorName}.jsx`)
);
return <DecorComponent key={decorName} />;
})}