score:2

Accepted answer

it should be import fakeauth from '../fakeauth'

you just have to go 1 folder up where you have fakeauth.js file. adding '..' does that.

score:1

since you're using module.exports you can import in the following fashion inside header.js:

import { isauthenticated, authenticate, signout  } from "../fakeauth";

codesandbox demo


Related Query

More Query from same tag