When I was looking for React tutorials, everyone was throwing shade at To Do apps. You made a great tutorial and I learned a lot! Thanks.
css for near the end of the tutorial:
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',
'Lucida Sans', Arial, sans-serif;
}
body {
background: linear-gradient(
90deg,
rgba(48, 16, 255, 1) 0%,
rgba(100, 115, 255, 1) 100%
);
}
.todo-app {
display: flex;
flex-direction: column;
justify-content: start;
width: 520px;
min-height: 600px;
background: #161a2b;
text-align: center;
margin: 128px auto;
border-radius: 10px;
padding-bottom: 32px;
}
h1 {
margin: 32px 0;
color: #fff;
font-size: 24px;
}
.complete {
text-decoration: line-through;
opacity: 0.4;
}
.todo-form {
margin-bottom: 32px;
}
.todo-input {
padding: 14px 32px 14px 16px;
border-radius: 4px 0 0 4px;
border: 2px solid #5d0cff;
outline: none;
width: 320px;
background: transparent;
color: #fff;
}
.todo-input::placeholder {
color: #e2e2e2;
}
.todo-button {
padding: 16px;
border: none;
border-radius: 0 4px 4px 0;
cursor: pointer;
outline: none;
background: linear-gradient(
90deg,
rgba(93, 12, 255, 1) 0%,
rgba(155, 0, 250, 1) 100%
);
color: #fff;
text-transform: capitalize;
}
.todo-input.edit {
border: 2px solid #149fff;
}
.todo-button.edit {
background: linear-gradient(
90deg,
rgba(20, 159, 255, 1) 0%,
rgba(17, 122, 255, 1) 100%
);
padding: 16px 22px;
}
.todo-container {
display: flex;
flex-direction: row;
position: relative;
}
.todo-row {
display: flex;
justify-content: space-between;
align-items: center;
margin: 4px auto;
color: #fff;
background: linear-gradient(
90deg,
rgba(255, 118, 20, 1) 0%,
rgba(255, 84, 17, 1) 100%
);
padding: 16px;
border-radius: 5px;
width: 90%;
}
.todo-row:nth-child(4n + 1) {
background: linear-gradient(
90deg,
rgba(93, 12, 255, 1) 0%,
rgba(155, 0, 250, 1) 100%
);
}
.todo-row:nth-child(4n + 2) {
background: linear-gradient(
90deg,
rgba(255, 12, 241, 1) 0%,
rgba(250, 0, 135, 1) 100%
);
}
.todo-row:nth-child(4n + 3) {
background: linear-gradient(
90deg,
rgba(20, 159, 255, 1) 0%,
rgba(17, 122, 255, 1) 100%
);
}
.icons {
display: flex;
align-items: center;
font-size: 24px;
cursor: pointer;
}
.delete-icon {
margin-right: 5px;
color: #fff;
}
.edit-icon {
color: #fff;
}
at 20.00 mnt, im stuck beacuse error. and after checked in console have notice :
react-dom.development.js:86 Warning: You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root.
any one have solutiion?
your are just typing the code, please try to explain what does those function do. so that it will be easy to understand.
Master! This video answered all the questions I was having with React! Thank you!
Luckily I wasn't completely new to React because in all honesty this wasn't a very well planned out tutorial for beginners.
From a learning perspective, it was hard to follow as you declared functions several times before they were written.
It probably does make complete sense to someone well versed in React because you can do them in whatever order (as you know how to tie them up ultimately) but as a novice, it's hard to follow and understand.
However that criticism aside, I really enjoyed making this application and have subbed for more.
Nah he just doesn't know what he's doing. It's easier to make a UA-cam channel and pretend you know how to code than it is to just learn to code and get a job...
I see it ALL the time.
@@MM-lo9tk Lol chill out bro, he is on a "coding journey", learning by teaching. Haters gonna hate.
agreed, he really didnt make it beginner friendly. For sure should not decalre things before he even writes them. was confused for so much of it. I think he needs to redo the video, and do one step at a time.
I noticed a few comments in here that are critical but respectful and hit on a crucial point for your channels content in general - the things you create are amazing, elegant, and beautiful, but the way you explain them is not very effective. The order in which you do things is perhaps convenient based on the template you've created, but from a learning perspective it's hard to see what's going on let alone draw those necessary correlations. I'm familiar with React, so I can see what's going on, but that only makes it clearer how strange the approach to some of these things is.
That being said, I only take the time to write this comment because I love the concept of your channel, your developments are beautiful, and you're a cool dude so I'd love to see you get more views and subs. I'd also love to be able to use your videos to learn more!
Excellent tutorial!! Thanks for all the hard work. Love your entire channel
Thanks man. I wanted to get a project done in react before moving on to learning back-end stuff. This got me there, will have some fun playing about with the CSS tomorrow!
at 20.00 mnt, im stuck beacuse error. and after checked in console have notice :
react-dom.development.js:86 Warning: You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root.
any one have solutiion?
thanks for this great tuturial. i needed a toturial like this to have a good training project and really enjoyed of coding this app . i'll follow the entire of your channel bro ;)
Again good tutorial. One request is that while using any inbuild function, feature from react for example useEffect method then please explain its significance and why we should use it if time permits. This can clear React fundamentals as well.
Brian Design - Thank you so much for this tutorial. It is really helpful.
This was a great app. Local storage add on would be nice with this app.
Brian thanks alot for put some effort and time to make a tutorial for people, I really appreciate, one that I need to mention is that since you have already mastered react, it's so easy for you to understand why you are doing something as simple as writing some thing to fix the button which refresh the page instead of send some information, but for me as a beginner, it's so hard to decode what you wrote there, as I need to understand how would that send information to database or something.
So please keep your cool work up, and add some more details
at 20.00 mnt, im stuck beacuse error. and after checked in console have notice :
react-dom.development.js:86 Warning: You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root.
any one have solutiion?
beautiful! I loved the tutorial! I learned so much!
Thank you very much, my friend! I think this world is getting better thanks to you!! )
Thank you so much for this brilliant tutorial, I had not a clue about react before today. I still have a long way to go but feel confident I can get there from this tutorial. Clear, concise, transparent and fun. Genuine thanks.
The reason why console.log(...todos) not printing the latest added element is because setTodos is setting the value to todos. React doesn't immediately do that and it also takes a callback. So, javascript generally doesn't wait the setTodos to finish its work and console the items it have on todos. React plans out the re-rendering of the component when the state is updated. It doesn't do that immediately.
Dude you are the best man. I dig your videos
Thank you so much for this tutorial. I helps a LOOOT of people with their developing careers including me as an intermediate learner. Keep on uploading :)
banger as always. Keep it up!
Sos un grande amigo, gracias por subir este contenido!!
Thank you for the starter project that I worked on
Not for absolute beginners but its a good video in order to get an idea of what's going on.
Great tutorial ! I learned a lot, thank you for taking the time to make this I found it very helpful!!
Superb Brian..... Keep it up :)
thanks for this video. I've been learning & coding in JavaScript since January and although it took me 2 days, I was able to build my first app.
at 20.00 mnt, im stuck beacuse error. and after checked in console have notice :
react-dom.development.js:86 Warning: You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root.
any one have solutiion?
Great tutorial! You taught me code and a great attitude. Excellent instructions, thanks!
I am having an issue and I want to know if this is just a limitation of the way its programmed or if i messed up. When editing a todo and then submitting the edit. the content of the other edits disappear. Any fixes?
works perfect, I definitely subscribed...thanks!!!!
great beginner tut for the todo in react!
Good day! Could you tell me how to bind each input to the list of elements, and when entering text into an input, it would be displayed in the line below the element ?
This was great. tysm
I just started learning react, and i learn so much from you, are you going to make a crud project using react and firebase?
by help of this extensively great tutorial i fixed my whole problms thanks very much
Thank you so much!
You did a great job!
I wish you health and success!!!
With love from Ukraine :)
Fire. Not for the true beginners, but it was a good struggle and learning experience for a lvl 3 like me.
You saved my life, thank you!
Great vid helped a lot!
superb tutorial. works great
Awesome Tutorial!
Setting Id incrementally, zero to infinite instead of having random number in a range:
const [id, setId] = useState(0);
const giveId=()=>{
setId(id + 1)
return id;
}
const handleSubmit = (e)=> {
e.preventDefault();
props.onSubmit({
id: giveId(),
text:input
});
setInput("");
};
at 20.00 mnt, im stuck beacuse error. and after checked in console have notice :
react-dom.development.js:86 Warning: You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root.
any one have solutiion?
So glad i came across your channel, this was a great tutorial! Would it be possible to create a part 2 to this? i'd love to learn how you'd store the to-do list data so that it doesn't clear out on refreshes, perhaps using firebase realtime database?
Hey, thanks for commenting! So you could implement localstorage to save the data, but firebase would prob be better since it's saved there. There's plenty of other todo app tutorials I've seen where they implement firebase/local storage that you could simply add to the code I made for this app if you wanted to do it now.
I'll most likely update all my projects with firebase or backend in the future, but for now you could probably find a few resources to get started on youtube
Can you please share me the source code please? Iam stuck with an error props.submit is not a function.
AMAZING Rich!
Hi Brian, thanks for the great tutorial, your react website tutorials are some of the best on UA-cam. I've completed this successfully but there's a strange behavior I noticed on both yours and my own that I couldn't figure out. Considering we log the todos after every submission, why does the first not show when we click add for the first time? They always seem a task behind in the log? Strange stuff.
hmm I'll have to check that out. If you find a solution, feel free to let me know
@@briandesign Lol just figured it out via of course StackOverflow. It's due to useState not being synchronous. Not sure if links are permitted in your comment section but I'll leave this here should you be interested, or be it useful to anyone else: stackoverflow.com/questions/28773839/react-form-onchange-setstate-one-step-behind.
stackoverflow saving the day haha. I'll check that post out! Thanks for sharing Keelan
which extensions are in use during this tutorial? which one autofills the html tags and which extension organised the code in the input tag for you?
Thank you. It was very good. I wish you success
Man thank you for this.
most excellent my dude
Awesome video, but if i would like to shared the value of the input with another component how do i do?, with redux {dispatcher, etc}?
Really helpful , nice UI
i would have loved to see a save feature i would have used this for my everyday needs
Great tutorial ! I learned a lot, thanks for share this video
at 20.00 mnt, im stuck beacuse error. and after checked in console have notice :
react-dom.development.js:86 Warning: You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root.
any one have solutiion?
Help Please !!! I am getting Error
TypeError: Cannot read property 'map' of undefined
Tks man, u help me so much!
Awesome videos it helps me alot
Awsome, subbed.
can you make a number guessing game in React js as well? with reset, clear and submit button, or how many attempts are left?
Could you do a follow up tutorial on how to persist this To do list to a database?
thanks for make this video im do excited when I learn it with your video, I like your explaintation.
thank you, master!
have issue in the minit 32
cant add item in the fields ??
any help please ?
This app shows the importance of having a centralized state , the prop drilling is serious here
Exactly, and it's not really helpful that functions are declared before he actually writes the functionality for the function.
@@laturchasanket6901 It happens on his videos. He just needs to commit to one thing at a time; he assumes we already have the end in mind as he does since he is the creator. When someone is coding along, the process needs to be linear.
Can someone explain to me on 37:37
- what is that 'prev' variable in the setTodos ? if I put a function in it with parameter, the parameter will be the entire todos?
also, how does the second form [when editing] disappear after submiting? the first one always stays so why does the other one just disappear? [asking code wise, I understand why it's gone - its only for edit]
tnx
Question: How does submitUpdate get a value passed to it? When we call submitUpdate when don't pass a value as an argument.
When we update the to-do item, the text gets changed but the id for that item is set to NaN. Is there any way to tackle this?
i see your all videos AND i like your videos
Thanks for the tutorial. For newbies out there like me looking to clone, the public folder and index.html is not included so you will get errors with npm. :) Just thought Id mention that.
Super fun!
Super Thanks bro!
Thanks for the tutorial.....Can you help me with one more thing.....How to store the same code in local storage so that whenever the browser is refreshed the list remains. Thanks in advance.
Thank you so much!
can someone explain me the edit part of the application. how did it work and all?
Fantastic ❤️ thanks
Thank you so much sir ❤️
I created but when I am going with edit button it's editing options is coming but when I edit and add again edit showing error :- props.onSubmit is not a function iside TodoForm ????? Please resolve as soon I'm stuck in last minute 🙄
CSS File to save you all time.
{
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande',
'Lucida Sans', Arial, sans-serif;
}
body {
background: linear-gradient(
90deg,
rgba(48, 16, 255, 1) 0%,
rgba(100, 115, 255, 1) 100%
);
}
.todo-app {
display: flex;
flex-direction: column;
justify-content: start;
width: 520px;
min-height: 600px;
background: #161a2b;
text-align: center;
margin: 128px auto;
border-radius: 10px;
padding-bottom: 32px;
}
h1 {
margin: 32px 0;
color: #fff;
font-size: 24px;
}
.complete {
text-decoration: line-through;
opacity: 0.4;
}
.todo-form {
margin-bottom: 32px;
}
.todo-input {
padding: 14px 32px 14px 16px;
border-radius: 4px 0 0 4px;
border: 2px solid #5d0cff;
outline: none;
width: 320px;
background: transparent;
color: #fff;
}
.todo-input::placeholder {
color: #e2e2e2;
}
.todo-button {
padding: 16px;
border: none;
border-radius: 0 4px 4px 0;
cursor: pointer;
outline: none;
background: linear-gradient(
90deg,
rgba(93, 12, 255, 1) 0%,
rgba(155, 0, 250, 1) 100%
);
color: #fff;
text-transform: capitalize;
}
.todo-input.edit {
border: 2px solid #149fff;
}
.todo-button.edit {
background: linear-gradient(
90deg,
rgba(20, 159, 255, 1) 0%,
rgba(17, 122, 255, 1) 100%
);
padding: 16px 22px;
}
.todo-container {
display: flex;
flex-direction: row;
position: relative;
}
.todo-row {
display: flex;
justify-content: space-between;
align-items: center;
margin: 4px auto;
color: #fff;
background: linear-gradient(
90deg,
rgba(255, 118, 20, 1) 0%,
rgba(255, 84, 17, 1) 100%
);
padding: 16px;
border-radius: 5px;
width: 90%;
}
.todo-row:nth-child(4n + 1) {
background: linear-gradient(
90deg,
rgba(93, 12, 255, 1) 0%,
rgba(155, 0, 250, 1) 100%
);
}
.todo-row:nth-child(4n + 2) {
background: linear-gradient(
90deg,
rgba(255, 12, 241, 1) 0%,
rgba(250, 0, 135, 1) 100%
);
}
.todo-row:nth-child(4n + 3) {
background: linear-gradient(
90deg,
rgba(20, 159, 255, 1) 0%,
rgba(17, 122, 255, 1) 100%
);
}
.icons {
display: flex;
align-items: center;
font-size: 24px;
cursor: pointer;
}
.delete-icon {
margin-right: 5px;
color: #fff;
}
.edit-icon {
color: #fff;
}
I have a question...
const submitUpdate = value => {
updateTodo(edit.id, value);
setEdit({
id: null,
value: ''
});
};
if (edit.id) {
return ;
}
but you didint give any parameter for submitUpdate Function. how it take its value to update?
how can i get emmet for jsx like for me i cant just type input and it does it i have to do manually
could someone please explain the spread operator usage in the TodoList at 18:53
thank you!
I write the codes as you. But whenever I type in anything in the input I get this error on the console:
A component is changing a controlled input to be uncontrolled...
wrote code like u and got error Uncaught TypeError: Cannot read properties of undefined (reading 'text') in props.onSubmit.
Please help!
where does ever the property "is Complete" appear? I mean the object created only has "id" and "text" as keys but even "text" is changed for "value" I'm really confuse
Bro, it's awesome, thank you so much..but can i make it responsive by using media query in css file
Thanks! Yeah you'd just have to customize the CSS for it to be mobile responsive
Where did the props.edit come from in TodoForm? I don't see that props passed in the ToDoList component
Thank you so much. What is them you used?
How do you gave addTodo the parameter value of todo and then used todo.text
is it coming from the child component cause you haven't returned any value from there.
correct me if I'm wrong
I have an error that says props are undefined. Any suggestions? I followed the video.
Thank you!
Thanks a lot.
❤
When you said, this line of code you dont need to understand in it at 17.40 in your video. Man, i laughed really hard cos javascript is jst complex. We just have to learn everyday.
Good Project Thanks..🤓
how can i make each bullet list of li has special color?
thanks for the tutorial. i can see your variable params are set to a redish pinkish color. Can you teach me how to set those changes? I tried tokencolorcustomization but it seems to highlight other variables too :'(
Can someone explain the todo.isComplete I didn't get where did we declared its initial value??
Just instant like =)
After i tried following the video, i just realized this is not for beginner.
But it's good.
Me: beginner react
Yeah, same here. I copied and tryed to understand the code in the process but it's quite difficult for a newbie.
Yes he wrote all methods and state from the beginning itself then only he handle the input field but still we can understand if we have lil konowledge about react
@@asifck439 actually there are lots of things going on which are connected with each other but he wrote the things first which comes in last