I have a little component library I am trying to build out. So it made sense to put them in a folder and only import the ones I need or all at once if needed using the import * from folder.
It looks a little something like this.
/sliceZone
|--index.js
|--newsBlock.js
This is how I'm exporting my component in newsBlock.js:
export default NewsBlock;
Inside my index.js in the sliceZone folder I have:
export { NewsBlock } from './newsBlock';
and inside the file Im working on I am trying to import it like:
import { NewsBlock } from './sliceZone';
But I'm getting the error in my terminal
warn "export 'NewsBlock' was not found in './sliceZone'
How do I export components from a index.js
file?