2:03:09, those who are confused, why the user is not being set even after he has set the role, which is clearly visible in localstorage, the reason is that he has not converted it to javascript object, he forgot to use JSON.parse() in useEffect, which resulted in being user as undefined.
Well, guys the problem at 4:08:54 (empty object at 3) is pretty simple to resolve if you know how React works, and no, it is not because of strict mode. The reason for this is that we are using setNewTask (useState) to create a new object on submit, and we are pushing newTask into elem right after the setNewTask. Now React state updates are asynchronous. This means that when you try to push newState into elem while the object inside setNewTask has not yet been created, it still has an empty object. due to which every time your first push will be an empty object (as while state creation it was initialized). If you still didn't understand here is something: 1) const [newTask, setNewTask] = useState({}); 2) setNewTask({ taskTitle, taskDescription, taskDate, category, active: false, newTask: true, failed: false, completed: false, }); 3) elem.tasks.push(newTask); Now 1 will run first, seNewTask is asynchronous which means it will take time so 3) will run , now when 3) runs before 2) newTask has an empty object . Now after 3) runs your 2) will run . hope this makes sense. FIX: you don't need a state just use a constant function. code___________________________________________: const submitHandler = (e) => { e.preventDefault(); const newTask = { taskTitle, taskDescription, taskDate, category, active: false, newTask: true, failed: false, completed: false, }; const data = userData; data.forEach(function (elem) { if (asignTo === elem.firstName) { elem.tasks.push(newTask); elem.taskCounts.newTask = elem.taskCounts.newTask + 1; } }); setUserData(data); console.log(data); setTaskTitle(""); setCategory(""); setAsignTo(""); setTaskDate(""); setTaskDescription(""); }; Hope this is helpful guys
Thank You ! Your Content is One of a kind and is what is required in current scenario. This is the best way to learn it . I've seen many other tutorials none were as good as this video because here you make mistakes and teach us how to solve them.Keep up the Good Work. I wish this channel makes more traffic.
yrr bhaiya mn yehi wait krraha ttha aj 17 oct hai react project dalna tha apnay aur bs foran youtbe pay agaya ❣️❣️❣️abhi betha hn dekhnee amazing love from pakistan bhaiya❤️❤️❤️you guyz are amamzinggh
Nice project brother, i just completed the project and came here to appreciate you and harshbhaiya for such an amazing content . I would love to saw more videos like this some more complex project
Thank you, bhayya. I genuinely appreciate how you tackle projects freshly and show us the errors and how to fix them. It makes the learning process so much more authentic and relatable. Big thanks to Sheriyans for making me realize that you always need to go through trial and error to achieve success.❤
Thanks for giving this type of project video...REally, I've learned a lot. I'd low idea of how to and where to and when to use states, useEffects, UseContext, forEach, find etc etc...after, your project video i've learned a lot and also got some confidennce.. I hope you'll upload this type of project in the incoming days...and with your this project video, it took me to 15-16 days to make this project by myself... thank vaiya...
No hate, but without using backend how can you say this project is a industry level project, real work starts only when there is backend, I may be partially wrong but one thing is for sure that I am not totally wrong
yes backend is the brain of the project but now the viewers don't know backend bro if you u can implement by yourself just learn from anywhere dont depend on any one,
yess,, i was thinking the same,, as a 10 LPA kind of industry grade project, it should be like first creating the highlevel and then low level system design all the apis gonna build data models etc.,, then if you wanna complete the frontend part first, mimicing incoming data by using dumy data is fine,, or better built the backend first(my opinion). though its just my opinion , it depends on how do the developer vision and after all the results matter. Again its just an opinion.
Nice video bro it would be very help full for any one who has finished the learning phase of react and willing to go to project phase make few more context of this sort...!
1:39:40 admin dashboard or user dashboard wali conditional statement wrong h as uska else wala part joki employee dashboard ko render krti h wo humesha true rhegi. (proof - u can see the scroll bar coming in right the dashboard is rendered below the login page)
As promised, here's the link to the complete source code! 👇
github.com/saarthack/ems
Start building! 🔥❤
Nice😊
Sir app ko deploy kaise karen please bata do🤪
Bhaiya literally wow 🤌.... Kya kahu .... Ek hi dil to hai..... kitni baar jitoge....
10 lpa project hai kya hai?😂😂
Animated website using react please ❤
( gsap, scrolltTrigger, sheryjs )
Please jaldi video lao mera college hackathon ke kam ayega.🥹🥹
we support sheryians and want more projects with full backend in mern
2:03:09, those who are confused, why the user is not being set even after he has set the role, which is clearly visible in localstorage, the reason is that he has not converted it to javascript object, he forgot to use JSON.parse() in useEffect, which resulted in being user as undefined.
Bro, Great observation!!!
Yes, we want backend in this project.
Your energy is incredible-that’s exactly why you’re making such an impact here. 🎊
kaafi sahi leel ka project hai, definitely want more of this content!!
Well, guys the problem at 4:08:54 (empty object at 3) is pretty simple to resolve if you know how React works, and no, it is not because of strict mode. The reason for this is that we are using setNewTask (useState) to create a new object on submit, and we are pushing newTask into elem right after the setNewTask. Now React state updates are asynchronous. This means that when you try to push newState into elem while the object inside setNewTask has not yet been created, it still has an empty object. due to which every time your first push will be an empty object (as while state creation it was initialized).
If you still didn't understand here is something:
1) const [newTask, setNewTask] = useState({});
2) setNewTask({
taskTitle,
taskDescription,
taskDate,
category,
active: false,
newTask: true,
failed: false,
completed: false,
});
3) elem.tasks.push(newTask);
Now 1 will run first, seNewTask is asynchronous which means it will take time so 3) will run , now when 3) runs before 2) newTask has an empty object . Now after 3) runs your 2) will run . hope this makes sense.
FIX:
you don't need a state just use a constant function.
code___________________________________________:
const submitHandler = (e) => {
e.preventDefault();
const newTask = {
taskTitle,
taskDescription,
taskDate,
category,
active: false,
newTask: true,
failed: false,
completed: false,
};
const data = userData;
data.forEach(function (elem) {
if (asignTo === elem.firstName) {
elem.tasks.push(newTask);
elem.taskCounts.newTask = elem.taskCounts.newTask + 1;
}
});
setUserData(data);
console.log(data);
setTaskTitle("");
setCategory("");
setAsignTo("");
setTaskDate("");
setTaskDescription("");
};
Hope this is helpful guys
Hii , can you give your source code for this project
or we could just use async await ..?
@@ASMITPHUYAL-y2i yup do you want to complicate , why use state and then an async function for something which can be solved using a const
@@ASMITPHUYAL-y2i we cannot use async await. It will not work
so, we should remove the setTask state, and are you gettting the userData from the authContext like sarthak did?
Best RUclips channel for web development 💯
Yt kholthe hi video recommend hua meri Khushi batha nahi saktha❤
3:13:20 see the date this video is recorded on 14 oct ! Really Sheriyans are working very hard for us!
Thank You ! Your Content is One of a kind and is what is required in current scenario. This is the best way to learn it . I've seen many other tutorials none were as good as this video because here you make mistakes and teach us how to solve them.Keep up the Good Work. I wish this channel makes more traffic.
yrr bhaiya mn yehi wait krraha ttha aj 17 oct hai react project dalna tha apnay aur bs foran youtbe pay agaya ❣️❣️❣️abhi betha hn dekhnee amazing love from
pakistan bhaiya❤️❤️❤️you guyz are amamzinggh
Nice project brother, i just completed the project and came here to appreciate you and harshbhaiya for such an amazing content . I would love to saw more videos like this some more complex project
Bhai work kar rha hai properly?
Yes, do you want github link?
we need full mern series, with full stack projects
Thank you, bhayya. I genuinely appreciate how you tackle projects freshly and show us the errors and how to fix them. It makes the learning process so much more authentic and relatable. Big thanks to Sheriyans for making me realize that you always need to go through trial and error to achieve success.❤
Thanks for starting a series like this
i saw your react last video, amazing and from then only we were waiting for tailwind
At 23 Oct 2024, completed till 1:10:00.
Soon will complete the full project InshaaAllah 💪🏻
Thanks for the video.
Has you completed it?
@@shouryamittal5500 *Have
After you get that salary, let us know. I will also start watching it.
project done.......gonna add more functionalities to it⌛❤🔥
Bro can you provide ur GitHub link I'm facing issues
1:26:56 muje console me null ku aaraha hai koi bato psss pzzzz pzzzz bhot try kiya solution nahi milra
bhaiya video ke starting me dikhya karo ki end product kaise dikhne wala hai
or ek overview diya karo
❤1 like = Job
❤1 like = 1 Project 😏
ha tere pe comment karne se hi toh job mil rhi, agar aisi harakte karte rahe to sabka to pta nhi tera to nhi hi lagega
Bro😂
Bhai mene aapka channel dosto ke saath share nhi 😢 kiya kyunki aap padhate ho hi itna acha ki kisi or ko btane ka man hi nhi karta 😅😅😅❤❤❤❤
Us bro us😂😅
Same Bhai Mene Bhi Kisi Ko Nhi Bataya
Literally Bhai us 😅
@@MANISHKUMAR-wb7hc bhai mere dost ka naam bhi manish hi hai😅😅
Lekin bhai tere dost bhi tujhe bina btaye SHERYIANS CODING SCHOOL ko hi dekhte honge🤣🤣🤣🤣
yesterday i complited react js course and today you just uploaded next video ..thank you so much
One of the world best instructor love from Pakistan ❤❤
Thanks for giving this type of project video...REally, I've learned a lot. I'd low idea of how to and where to and when to use states, useEffects, UseContext, forEach, find etc etc...after, your project video i've learned a lot and also got some confidennce.. I hope you'll upload this type of project in the incoming days...and with your this project video, it took me to 15-16 days to make this project by myself...
thank vaiya...
Bhot sahi bhaiya bhot hard 🎉🎉🎉
finally completed this project .Thanks bhai🙇♀
motivation in the middle 🔥💯
No hate, but without using backend how can you say this project is a industry level project, real work starts only when there is backend, I may be partially wrong but one thing is for sure that I am not totally wrong
yes backend is the brain of the project but now the viewers don't know backend bro if you u can implement by yourself just learn from anywhere dont depend on any one,
yess,, i was thinking the same,, as a 10 LPA kind of industry grade project, it should be like first creating the highlevel and then low level system design all the apis gonna build data models etc.,, then if you wanna complete the frontend part first, mimicing incoming data by using dumy data is fine,, or better built the backend first(my opinion). though its just my opinion , it depends on how do the developer vision and after all the results matter. Again its just an opinion.
God of youtube learning industry is back ❤
please ase projects ki video ooor bhi layo, mza agya is project ko bna😉😁
We want Mern stack projects ❤❤❤❤❤❤❤
Bhai full mern Stack base project bnwao plz humne front end aur backend ki communication seekhni ha 😊
Bhai Aisa kuch tutorial/end to end wala video Mila kya tumko ki dono Sikh saken frontend and backend aur uska dono ke bich ka communication😊
Doneeeeee,,Completed and also created😭😭❣❣
github link do
Best React Project With Great Explanation and Beginer can make this project easily and simply.
Thank you sarthak bhai for this vedio(reach badhne keliye comment kiya h).
incredible project love it 😍😍😍😍
You Are Great Developer love From Pakistan ❤❤❤❤❤❤
Hi sarthak it's really a great project anyone can understand easily
Nice video bro it would be very help full for any one who has finished the learning phase of react and willing to go to project phase make few more context of this sort...!
Mujhe pta hai ye project bana kar koi 10lpa ki job wob nhi lagne wali par fir bhi practice ke liye dekh rha hu 😅
i wonder Internship bhi lagegi ya nhi
Love from Gujarat ❤
Thkx brother waiting for this video 😊😊😊
Love ur content ❤
Feeling glad that i am studying at offline centre....
Was waiting for this! For past couple of days
bro your way of teaching is superb
🥺 sharthak bhaiya 🎉apki mehnat dekh mere aankh 🥺bhar atain h.
Jitna v video h apki sab mast h .🎉
Bhai itni achchi video banai mager local storage ke data wagera mai bht bhapla diya aap ne
we need a full stack project
we want backend on this project.....🔥🔥🔥🔥
Good work bro ❤
This will Change of many peoples life❤
Wowwww❤
Thanks sarthak, i'll complete those comments
addicted to this channel 🐲💗
amazing work by Sheryians team
Hi bro love your videos great explanation ❤
Pichhle videos ki baat kr raha hai wo
we want more projects like this
4hrs straight upp without bakwaas TYSM bhaiya ❤
Thank you sheryians 💕
BUHUT BADHIYA ❤
Very very very good explanation bhaiya ❤
Bestest explanation bhai❤
1:39:40 admin dashboard or user dashboard wali conditional statement wrong h as uska else wala part joki employee dashboard ko render krti h wo humesha true rhegi.
(proof - u can see the scroll bar coming in right the dashboard is rendered below the login page)
{!user ?:''}
{user=='admin'?:(user == 'employee' ? :null)}
This is updated code for anyone who need
This is crazy video thanks for sheriyans coding school
Great Work Sir
we want more projects videos like this
Bro such a great project just make another full stack project after uploading backend with industry standards
Nice content 🎉
Nice😊 & Thanks for this project
Amazingggg 🎉
kya padhaya hy sirr. bilkul sbb kuch clear ho gya aik aik cheez!!!
have you completed this project
@@aryakakade929 almost
@@BeastGuru52 hey bro can u give me the source code
@@Call_Me_Mortis sir may nay context ki jaga redux use kiya hy chahiye hy tu btao
Nice & Thanks for this Project👋
Me ne apse aur harsh Bhai se buhut Kuch seekha h. So many many thanks🎉
Amazing Project
Sir, Figma ka File Agar provide krte toh khud se practice krte agar kahi pe dikat aata toh phir apke tutorial follow krte....😇
Sheriyans ❌
Goats ✅
Thankyou so much for this amazing project❤❤
Thank u so much ❤❤❤.
Love u all sheriyans
video dekhne me maza to aata hai bhai, thanks for the project
First View Love From Pakistan ❤👍🏻 Shreyans will Takeover is all over RUclips in the future. This is not a prediction this is a spoiler 💀
Awesome ❤️❤️❤️❤️❤️
Thankyou so much Bhai❤❤❤❤❤❤
great will be waiting for backend project of the same 🔥🔥
Thankyou Brother for giving us your important knowledge
Wonderful project bhaiya ji🙏
Thank you so much
Great project 💯
Thank you so much for this video, love from bangalore ❤❤❤
Thank you bhaiyya for providing such projects..
1:42:43 मोक्ष (Moksh)
Love From Pakistan. Really Amazing Playlist.
Love from Pakistan ❤🎉. Although you don't accept it but still sending it over🎉😊. Learned a lot from you!
Bhai tumhe roti miltihe kay?😂
@@rakshii4962 bhai tumhe आटा milta hai kya aisa puchhna chahiye tha roti to door ki baat hai 😂
@@msd7rishi514 han bro sab milta hay 😂😂😂😂 per mehnga bahut hay 😁
@@rakshii4962han milti ha beef ke sath 😂😂😂😂
@@alirana9244 bro vo beef he ya suar dheklo
Great Work !!!!!
4:9:00 Last me useState se form handle kiya he apne isliye task null print ho raha he
Bhai sukoon mil raha jobless baithe hai tension, depressions ka virus ghussa hai ye Suraj ke kirne mili toh toda khula lag raha hai
❤❤❤
Watching From Pakistan Following MERN Series
Me too
Thank you sir love from PAKISTAN ❤❤
Thanks sir for this wonderful video❤❤❤❤❤❤
Love you sheryians ❤❤❤
hamesha ki tarah quality content