Building a Todo List with React Hooks useState

Building a Todo List with React Hooks useState

Ben Awad

5 лет назад

47,859 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@stanislavyankovskiy1374
@stanislavyankovskiy1374 - 27.10.2018 17:02

thanks!

Ответить
@zeocamo
@zeocamo - 27.10.2018 18:08

look cool and nice ... no more class :)

Ответить
@jackshannon5366
@jackshannon5366 - 27.10.2018 18:12

Great video.


Since you already have 'i', couldn't you just use that as the id?


How would hooks be used with a backend?

Ответить
@haxified67
@haxified67 - 27.10.2018 18:12

wtf is this thumbnail lol. Anyway, really nice tutorial ben! Keep up the great work

Ответить
@tjalferes
@tjalferes - 27.10.2018 19:17

These look awesome. useState, useEffect, and useContext alone look pretty nice, but custom hooks especially look awesome.

Ответить
@ZhenTech
@ZhenTech - 27.10.2018 20:16

what extention do you use for jsx formatting?

Ответить
@sumantkanala
@sumantkanala - 27.10.2018 21:07

perfect!

Ответить
@tkdevlop
@tkdevlop - 27.10.2018 21:32

I don't get this isn't whole point of functional components is to take some props return jsx based on that therefore avoiding state and lifecycle hooks for simplicity?

Ответить
@fdc_8507
@fdc_8507 - 27.10.2018 21:32

thanks alot...

Ответить
@andrijanovakovic
@andrijanovakovic - 28.10.2018 04:04

Hey what VSCode plugin are you using to show the size of the file in the first line up top?

Ответить
@sreekumarmenon
@sreekumarmenon - 28.10.2018 04:33

since it is in beta, is react hooks ready for production.?

Ответить
@Trucidare
@Trucidare - 28.10.2018 13:22

Just a nitpick: you should probably set your editor tabwidth to 2 instead of 4

Ответить
@sasha-petra
@sasha-petra - 28.10.2018 14:26

which plugin are you using to make jsx code prettier?!

Ответить
@iFrancisDC
@iFrancisDC - 28.10.2018 17:03

very good job

Ответить
@AbhishekKumar-mq1tt
@AbhishekKumar-mq1tt - 28.10.2018 18:32

Thank u for this awesome video

Ответить
@TheAidsaids
@TheAidsaids - 30.10.2018 09:00

keep up all the hooks videos, perhaps some more advanced application such as using the immer library for reducer draft immutability combined with useReducer

Ответить
@ceezar
@ceezar - 30.10.2018 20:12

what keyboard do you use?

Ответить
@RiccoSobers
@RiccoSobers - 31.10.2018 00:08

Thanks for the video. Looks like it's going back to more functional. Interesting. One thing that looks a bit ugly is creating a new instance of the custom hook for each field. Vs handleChange method. But the are probably better ways we are yet to discover. 👍🏾

Ответить
@ionutoprea5633
@ionutoprea5633 - 01.11.2018 16:34

What's the name of the theme for code highlighting?

Ответить
@GoeHybrid
@GoeHybrid - 02.11.2018 14:08

Spreading onto component is cancer. Please, don't.

Ответить
@GoeHybrid
@GoeHybrid - 02.11.2018 21:12

What extension do you use to highlight a block of code (that yellow snake-like line) ?

Ответить
@kivylius
@kivylius - 27.11.2018 13:54

the loop is unnecessary?

todos[i].complete = !todos[i].complete;
setTodos([...todos]);

Ответить
@tyapka
@tyapka - 16.01.2019 15:31

But I have no idea how this hooks work internally. I mean how do they keep state?

Ответить
@waqasaps
@waqasaps - 14.11.2019 09:49

Thank you for adding code on github

Ответить
@RaghuprasaadIyer
@RaghuprasaadIyer - 29.04.2020 13:48

can someone please tell me which font is it on the vs code?

Ответить
@kidbrave_7673
@kidbrave_7673 - 16.07.2020 06:57

I love your video your literally the 10 person I found for a to do list but even from this video it feels so heavy on the logic side of things is there any advice you can pass my way to help a beginner over here get through this frustrating stage as a beginner as being a react developer?

Ответить
@user-cx3jv8mb9t
@user-cx3jv8mb9t - 06.08.2020 23:05

thank you so much bro (:

Ответить
@shishirrai1069
@shishirrai1069 - 11.10.2020 16:52

Why does it add each task at top?

Ответить
@amolshrivastava7786
@amolshrivastava7786 - 13.01.2021 23:30

bro you are exceptionally good with React. How can I develop this level of expertise in React

Ответить
@rom3603
@rom3603 - 20.03.2021 15:06

It`s pretty cool, thank you!))

Ответить
@matthewmagnotta7070
@matthewmagnotta7070 - 06.05.2021 01:57

const toggleComplete = (i) => {
todos[i].completed = !todos[i].completed
setTodos([...todos])
}

removes the if statements and having to map through the todos

Ответить
@rakebullet5200
@rakebullet5200 - 17.07.2021 09:52

export default... stopped watching, haha..

Ответить
@jacobteasley206
@jacobteasley206 - 14.08.2021 07:23

Do you have to have two separate components for this to work or theoretically could it all be in App.js?

Ответить
@Endorsun
@Endorsun - 29.01.2022 20:33

Been really sruggling with forms in React. This video helped ALOT. Thanks as always Ben. You are super sexy, handsome, smart, and make me a better coder! xoxo

Ответить
@justme364
@justme364 - 29.05.2022 20:44

I feel ashamed because even this feels quite complicated and this is supposed to be very easy

Ответить