Комментарии:
not able to get data into console using useEffect
Ответитьhello sir, you are using useEffect to fetch data from json u are doing wrong async
because useeffect return sybchronous not asynchronous
Why can't you use this db. Json file inside src. Why we have to go for separate folder
ОтветитьSir please deploy it in netlify and show us. Am having error after deployed in netlify. I put separate folder for server. Is this the issue. If i run locally by starting both client and server, it is working properly. But after deployment it is not working it cannot able to get /contacts.please help me
ОтветитьCan anyone tell me how to deploy this project ?? Both server part and src-component. I made delopy using npm build and netlify but contact detail is not displaying..pls help
Ответитьsir while opening this project in new window , created contacts are not synching. can you clarify this
Ответитьsir how do i do this with spring boot please help me
ОтветитьSuperb! Tutorial 😊
ОтветитьThank you sir
💻
ty so much sir
Ответитьi have copied the code
useEffect (effect: async() => {
try {
let response = await ContactService.getAllContacts();
console.log(response.data)
}
catch (error){
}
}, inputs:[])
Deepak Kadela thanks and one more error geeting below code
src/components/contacts/ContactList/ContactList.jsx
Line 11: Parsing error: Unexpected token, expected ","
9 | })
10 |
> 11 | useEffect (effect: async() => {
| ^
12 | try {
13 | let response = await ContactService.getAllContacts();
14 | console.log(response.data)
how to solve this
ОтветитьI am getting an error
Failed to compile.
./src/components/contacts/ContactList/ContactList.jsx
Line 6: Parsing error: The type cast expression is expected to be wrapped with parenthesis.
4 |
5 | let ContactList = () => {
> 6 | let [state,setState] = useState(initialState:{
| ^
7 | loading :false,
8 | contacts : [],
9 | errorMessage : ''
Hi sir ,thanks for uploading such wonderful content...😍
Ответитьthis app so ussles
ОтветитьTo correct the useEffect() hook error - async await part for getting contacts - change your code to:
useEffect(() => {
async function handleResp(){
try{}
catch{}
};
handleResp();
}, []);
-------------------------
New version of react throws errors if you use async () => {}
🔥🔥🥰🥰🥰🥰
Ответитьthank you
Ответить