Linked Questions

12 votes
8 answers
6k views

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'; ...
Bony's user avatar
  • 151
10 votes
1 answer
18k views

store.js import {createStore, applyMiddleware} from 'redux'; import createLogger from 'redux-logger'; import rootReducer from './reducers/index'; const logger = createLogger(); const ...
Hieu Bui's user avatar
  • 105
1 vote
1 answer
6k views

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 ...
yash lohade's user avatar
5 votes
2 answers
2k views

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 ...
Oblomov's user avatar
  • 9,735
3 votes
1 answer
8k views

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", ...
HexaCrop's user avatar
  • 4,411
1 vote
1 answer
3k views

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 ...
Null isTrue's user avatar
  • 1,936
4 votes
0 answers
6k views

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-...
Dinil At's user avatar
-1 votes
4 answers
4k views

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?
Luca Sciarini's user avatar
2 votes
3 answers
966 views

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 } ...
Norris's user avatar
  • 33
2 votes
2 answers
2k views

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'...
Samurai Jack's user avatar
  • 3,155
1 vote
1 answer
2k views

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'...
BS100's user avatar
  • 884
0 votes
1 answer
942 views

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....
Zulu's user avatar
  • 81
0 votes
0 answers
908 views

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 ...
krave's user avatar
  • 1,919
0 votes
1 answer
217 views

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 ...
KawaiKx's user avatar
  • 10k
0 votes
1 answer
247 views

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 ...
spark's user avatar
  • 1,183

15 30 50 per page
1
2 3 4 5
8