Open ChaymaaBA opened 2 years ago
In order to import a component like this
import Component from 'somewhere'
first, you need to export it like this
export default Component
but if you export your component like this
export const Component = () => {}
you can use this syntax for importing it ( with curly bracket )
import { Component } from 'somewhere'
you can search for 'named export' for more info
./src/pages/Home.jsx Attempted import error: '../components/Categories' does not contain a default export (imported as 'Categories').