Linked Questions
108 questions linked to/from When should I use curly braces for ES6 import?
12 votes
8 answers
6k views
When do we use '{ }' in javascript imports? [duplicate]
I am learning Javascript imports and I am yet to understand when we use curly braces while importing items(functions, objects, variables) from another JS file. import Search from './models/Search'; ...
10 votes
1 answer
18k views
Uncaught TypeError: (0 , _store.configureStore) is not a function [duplicate]
store.js import {createStore, applyMiddleware} from 'redux'; import createLogger from 'redux-logger'; import rootReducer from './reducers/index'; const logger = createLogger(); const ...
1 vote
1 answer
6k views
export 'NavBar' (imported as 'NavBar') was not found in './NavBar' (possible exports: default) [duplicate]
Compiled with problems:X ERROR in ./src/App.js export 'NavBar' (imported as 'NavBar') was not found in './NavBar' (possible exports: default) That's My NavBar Js I Have Exported Navbar Still I Am ...
5 votes
2 answers
2k views
Difference between import {module} and import module [duplicate]
I have seen the following two variations for importing code from another module in ES6: import {module} from "./Module" and import module from "./Module" where module is a ES6 class defined in the ...
3 votes
1 answer
8k views
firebase export issue in react [duplicate]
I have a file named firebase.js. It contains the following code: import * as firebase from 'firebase'; const config = { apiKey: "some_random_key", authDomain: "some_random_authDomain", ...
1 vote
1 answer
3k views
React Import Modules using best practices [duplicate]
In your experience what's the best practice when importing large modules into your component. Could you please tell me which and the reason why from the example below? import * from './foo' or ...
4 votes
0 answers
6k views
./Reducers' does not contain an export named 'rootReducer' [duplicate]
I am getting this error while importing the reducer. index.js import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import {Provider} from 'react-...
-1 votes
4 answers
4k views
REACT: Call an external js function in a react component [duplicate]
Anyone know in reactjs how to be able to call that 'openSideMenu' function which is in the vanilla js file that I imported on the top?
2 votes
3 answers
966 views
When do I use {} and when do I not in import in JavaScript [duplicate]
I am learning Vue JS and find that sometimes we import {} sometimes we import without {}. What is the difference, please? import Home from '@/views/Home.vue' import { createRouter, createWebHistory } ...
2 votes
2 answers
2k views
Import with or without curly brackets in ES6 [duplicate]
What is the difference between: import Title from './title.js' and import { Title } from './title.js' ? I think it has some connection with export default Title; and export const Title; but I don'...
1 vote
1 answer
2k views
How do I export from a namespace, accessing the default? [duplicate]
I have a question about ES6 import module. I tried to add OrbitControls in my Three.js Code. Since OrbitControls is a separate module, I needed to import them individually in my code as below. and it'...
0 votes
1 answer
942 views
How do you split codes in Javascript? (import/export) [duplicate]
I've been trying to use ES6 codes to split up my codes so I won't have everything all on my main.js I've tried to use import/export such as: //example1.js export var str = 'hello world'; //main....
0 votes
0 answers
908 views
What is the difference between default import and alias import in ES6? [duplicate]
My question is about what's the difference between these two kinds of import. import abc from ./utilities/fibo and import * as abc from ./utilities/fibo I thought they were almost same, but it turns ...
0 votes
1 answer
217 views
Destructuring in named export? [duplicate]
In javascript,I import a named object like this: import {my_object} from './my_js.js' Is some sort of destructuring happening in this above mentioned import statement or using curly braces is just a ...
0 votes
1 answer
247 views
what is the difference about import import {} import * as in typescript [duplicate]
when I write code using typescript, sometimes import module using type 1: import foo from bar; sometimes import using type 2: import {foo} from bar; sometimes import using type 3: import * as foo ...