score:0

for images in react, you need to require

<img src={require('../assests/logo.png')} />

but it is totally different case with components. you import react components bases on how you exported.

and use es6 to import and export in reactjs

and there are two types of exports

named export

named exports are useful to export several values at ones. during the import, it is important to use the same name.

// how to export
export function myfunc() {}

// how to import
import { myfunc } from './myfile';

default export.

default exports are useful to export only a single value. during the import, able to omit the curly bares and use any name.

// how to export
default export function() {}

// how to import
import anynameyouwant from './myfile';

Related Query

More Query from same tag