File tree 3 files changed +20
-3
lines changed
3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 10
10
"@types/node" : " ^16.7.13" ,
11
11
"@types/react" : " ^17.0.20" ,
12
12
"@types/react-dom" : " ^17.0.9" ,
13
+ "axios" : " ^0.25.0" ,
13
14
"react" : " ^17.0.2" ,
14
15
"react-dom" : " ^17.0.2" ,
15
16
"react-scripts" : " 5.0.0" ,
39
40
" last 1 firefox version" ,
40
41
" last 1 safari version"
41
42
]
42
- }
43
+ },
44
+ "proxy" : " http://localhost:8000/"
43
45
}
Original file line number Diff line number Diff line change 1
- import { lazy , Suspense } from 'react'
1
+ import axios from 'axios'
2
+ import { lazy , Suspense , useEffect } from 'react'
2
3
import Comp1 from './components/Comp1'
3
4
import Comp2 from './components/Comp2'
4
5
@@ -9,6 +10,13 @@ const Comp1Lazy = lazy(() => import(`${n1}`))
9
10
const Comp2Lazy = lazy ( ( ) => import ( n2 + '' ) )
10
11
11
12
function App ( ) {
13
+ useEffect ( ( ) => {
14
+ axios . post ( '/v1/users/login' , {
15
+ username : 'username' ,
16
+ password : 'password' ,
17
+ } )
18
+ } , [ ] )
19
+
12
20
return (
13
21
< div className = "App" >
14
22
< Suspense fallback = "loading ..." >
Original file line number Diff line number Diff line change @@ -2373,6 +2373,13 @@ axe-core@^4.3.5:
2373
2373
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.3.5.tgz#78d6911ba317a8262bfee292aeafcc1e04b49cc5"
2374
2374
integrity sha512-WKTW1+xAzhMS5dJsxWkliixlO/PqC4VhmO9T4juNYcaTg9jzWiJsou6m5pxWYGfigWbwzJWeFY6z47a+4neRXA==
2375
2375
2376
+ axios@^0.25.0 :
2377
+ version "0.25.0"
2378
+ resolved "https://registry.yarnpkg.com/axios/-/axios-0.25.0.tgz#349cfbb31331a9b4453190791760a8d35b093e0a"
2379
+ integrity sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==
2380
+ dependencies :
2381
+ follow-redirects "^1.14.7"
2382
+
2376
2383
axobject-query@^2.2.0 :
2377
2384
version "2.2.0"
2378
2385
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be"
@@ -4145,7 +4152,7 @@ flatted@^3.1.0:
4145
4152
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.4.tgz#28d9969ea90661b5134259f312ab6aa7929ac5e2"
4146
4153
integrity sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==
4147
4154
4148
- follow-redirects@^1.0.0 :
4155
+ follow-redirects@^1.0.0, follow-redirects@^1.14.7 :
4149
4156
version "1.14.7"
4150
4157
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685"
4151
4158
integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==
You can’t perform that action at this time.
0 commit comments