techno
techno

Reputation: 6500

Variable declaration expected

I'm trying to learn React Flux by following this Video

https://www.youtube.com/watch?v=CmdPegEyyVs

This piece of code is highlighted by VS Code here

enter image description here

 import Flux from "@4geeksacademy/react-flux-dash";
     
    const export let addContact = (contact) => {
        
    }

What seems to be the issue here?

Upvotes: 0

Views: 322

Answers (3)

Uttam patel
Uttam patel

Reputation: 1

export is a keyword it can't be used as a variable choose different variable

Upvotes: 0

Anhdevit
Anhdevit

Reputation: 2104

"export const" not "const export let"

import Flux from '@4geeksacademy/react-flux-dash';

export const addContact = (contact) => {};

Upvotes: 1

Rushabh Gedam
Rushabh Gedam

Reputation: 310

Just remove the const before export. Definitely it will work out

Upvotes: 3

Related Questions