redapesolutions / react-redux-counter1

0 stars 0 forks source link

Module theory #2

Open matiboy opened 6 years ago

matiboy commented 6 years ago

Explain the different uses of named export vs export default and justify the need (if any) of export default *funcs* in reducers

mingsterism commented 6 years ago

can import that default export function by omitting the curly braces:

eg: No need to do import { function } from file.js. .... Instead import function from file.js

matiboy commented 6 years ago

I guess using function is probably not the best example since that's a reserved keyword ;) Is it necessary to name the "default" exports then, as you did in your code?