Building a Todo List App Project with Local Storage in React JS  & Hooks in 2021

Building a Todo List App Project with Local Storage in React JS & Hooks in 2021

Thapa Technical

3 года назад

97,086 Просмотров

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


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

@ThapaTechnical
@ThapaTechnical - 23.04.2021 13:38

Hope you all love the video ❤️
Plz LIKE SHARE SUBSRIBE my Channel for daily Awesome Vidoe 🙏

Ответить
@prajaktakapoor7520
@prajaktakapoor7520 - 03.07.2024 22:43

Broooo, you are awesomeee. Thankyou so much

Ответить
@poojachauhan8991
@poojachauhan8991 - 01.04.2024 10:51

wowwwwww it worksss

Ответить
@ajayrawat4687
@ajayrawat4687 - 18.02.2024 14:59

can anyone tell me why we have written getItem function outside the Todo function ??

Ответить
@noopurghosh9668
@noopurghosh9668 - 06.02.2024 16:11

Sir, I am not able to access the source code.

Ответить
@itsandroid
@itsandroid - 04.11.2023 18:32

Thanks!!

Ответить
@user-kq4lf7ex6f
@user-kq4lf7ex6f - 03.11.2023 11:38

Thankss bhaiiii , it workssss

Ответить
@deepakgauttam29
@deepakgauttam29 - 01.11.2023 21:41

source code is not free . he is asking money

Ответить
@lightedfighter4493
@lightedfighter4493 - 18.09.2023 20:52

in the first you start good and clear after that the english wich none understand start

Ответить
@hassaan-dev
@hassaan-dev - 12.09.2023 19:28

very helpful

Ответить
@Bharatanatyam1207
@Bharatanatyam1207 - 21.08.2023 19:11

very good videos, love it. but the line" the boom guys is epic :)

Ответить
@Amezing02
@Amezing02 - 19.07.2023 21:46

subscrib ke liye bhik mat managa kijye samjhe

Ответить
@welcometoourlearningworl-ii1mo
@welcometoourlearningworl-ii1mo - 18.07.2023 13:06

..dhsbdjnf

Ответить
@pateldikshit3899
@pateldikshit3899 - 14.04.2023 09:16

no sorce code in vedio description

Ответить
@mdfarhan0203
@mdfarhan0203 - 29.03.2023 23:10

thank you bro

Ответить
@munawar1288
@munawar1288 - 11.03.2023 07:39

Thank you got a knowledge....

Ответить
@webPro_faizan
@webPro_faizan - 12.02.2023 17:25

nice thapa bro

Ответить
@Apna_experience
@Apna_experience - 11.02.2023 21:51

Thapa bhiya....local storage in setdata multiple key value pair me kaise store kare

Ответить
@Dymosys
@Dymosys - 29.12.2022 13:56

Make video on front end jobs 👍

Ответить
@eexos
@eexos - 07.11.2022 07:04

thank apse mene react shikrahah hu mere ko bohot accha lagta hee

Ответить
@Adan760
@Adan760 - 25.10.2022 20:54

thanks thapa sirr

Ответить
@snj-chauhan
@snj-chauhan - 14.10.2022 10:52

Abe yrr tu source code GitHub pr dala kar naa tere website pe ek toh add itne hai or milta kuch nhi hai 😑😑😑

Ответить
@robinmathew8828
@robinmathew8828 - 22.09.2022 15:40

Is there any way store a default values permanently which will not loss when browser closed

Ответить
@mdriponkhandokar7894
@mdriponkhandokar7894 - 12.09.2022 08:53

All ok, but you start video is late..

Ответить
@jaoeduardo14
@jaoeduardo14 - 24.08.2022 05:11

Entendi nada que falou, mas me ajudou muito pra conseguir persistir os dados ao atualizar a página no meu projeto!

Ответить
@allualmazt2365
@allualmazt2365 - 25.06.2022 14:43

Hello thappa bhai please muja help karo aa esma i need code by using html and boostrap

Ответить
@allualmazt2365
@allualmazt2365 - 25.06.2022 14:42

Form with 2 inputs form controls and a button
*. Date Time Picker
*. Todo Item

*. Add Button

On clicking Add Button, validate whether date/time field and todo Item field
are populated
if not, throw an alert popup saying, "required fields are missing"
if yes, append the item to the bootstrap list-group

Ответить
@mythyking7207
@mythyking7207 - 16.06.2022 18:25

you save my day ❤

Ответить
@deepanshukhorwal8938
@deepanshukhorwal8938 - 04.06.2022 17:29

awesome explaination

Ответить
@raushanraj227
@raushanraj227 - 25.05.2022 16:04

This video is really helpful❤️❤️❤️

Ответить
@clickheist
@clickheist - 23.05.2022 19:09

I loved this video

Ответить
@divyeshsevra3097
@divyeshsevra3097 - 11.05.2022 16:40

you are awesome sir

Ответить
@NavneetKaur-vt8kt
@NavneetKaur-vt8kt - 26.04.2022 11:18

thank you so much for this!! <3

Ответить
@husler7424
@husler7424 - 23.04.2022 11:31

@Thapa Technical Please make a video on "how to preserve state while using Redux". Thank you for your all efforts, your teaching is amazing:)

Ответить
@_itsvinay
@_itsvinay - 14.04.2022 17:23

Pls help my code stucked here as error "ReferenceError: localStorage is not defined" i tried to write same code in Next.js only this local storage getItem is not working???

import { useState, useEffect } from 'react';
import Image from 'next/image';

//To get the items from local storage
const getLocalItems = () => {
let todoList = JSON.parse(localStorage.getItem('Todos'));
console.log(todoList);
if (todoList) {
return JSON.parse(localStorage.getItem('Todos'));
} else {
return [];
}
}

const Todo = () => {
const [inputData, setInputData] = useState('');
//here my code stucks if i pass localstoarge getItem which is inside of getLocalItems function in below useState of setItems instead empty arry

const [items, setItems] = useState([]);


const addItem = () => {
if (inputData) {
setItems([...items, inputData]);
setInputData('');
} else {
return alert('No Data to add');
}
}

const deleteItem = (id) => {
console.log(id);
const updateditems = items.filter((ele, ind) => {
return ind !== id;
});

setItems(updateditems);
}

const removeAll = () => {
setItems([]);
}

//adding data to local storage
useEffect(() => {
localStorage.setItem('Todos', JSON.stringify(items));
}, [items])


return (
<>
<div className="main-div">
<div className='child-div'>
<figure>
<Image src='/todo.svg' alt="Picture of the author" width={150} height={150} />
<figcaption>Add Your List Here 🔥</figcaption>
</figure>

<div className='addItems'>
<input type="text" placeholder="Add Item.... 🙌" value={inputData} onChange={(e) => setInputData(e.target.value)} />
<i className="fa fa-plus add-btn" title="Add Item" onClick={addItem}></i>
</div>

<div className='showItems'>
{items.map((ele, ind) =>
<div className='eachItem' key={ind}>
<h3>{ele}</h3>
<i className="fas fa-trash-alt add-btn" title="Delete Item" onClick={() => deleteItem(ind)}></i>
</div>
)}
</div>

<div className='showItems'>
<button className='btn effect04' data-sm-link-text='Remove All' onClick={removeAll}><span>CHECK LIST</span></button>
</div>
</div>
</div>
</>
)
}

export default Todo;

Ответить
@rajkumarkatare7843
@rajkumarkatare7843 - 13.04.2022 14:27

😀😀😀😀😀

Ответить
@nigelgreater7366
@nigelgreater7366 - 08.04.2022 12:28

There is no code is this a scam

Ответить
@deepakdheeps3314
@deepakdheeps3314 - 24.03.2022 12:29

He told free source code in video
But he asked 50rs for source code in portfolio website
He is pachas rupee mental

Ответить
@507_tyit_mehul_gohil7
@507_tyit_mehul_gohil7 - 08.03.2022 17:18

Ek video react-redux with localStorage pls sir

Ответить
@webdeveshverma3214
@webdeveshverma3214 - 06.03.2022 18:21

i love u sir

Ответить
@alone-ye3mz
@alone-ye3mz - 20.02.2022 19:34

File download link?

Ответить
@manilavaswani154
@manilavaswani154 - 20.02.2022 18:46

Thank you so much for such a wonderful video but i am having one doubt, refresh krne me data is not going but react first time open kro toh saved data bhi chala jata hai in that case what should we do ki saved data delete na ho? Please help

Ответить
@shyamsarkar5399
@shyamsarkar5399 - 15.02.2022 11:49

i am big fan sar

Ответить
@pratikpowale9657
@pratikpowale9657 - 28.01.2022 13:34

Thank u so much❤️

Ответить
@sarfarajshaikh6038
@sarfarajshaikh6038 - 25.01.2022 07:25

Congratulations on 400K ✌

Ответить
@natachavergara412
@natachavergara412 - 07.01.2022 17:27

Hello! Thanks for your video, i didnt undestand what you said but i coud understand your code!
Really thank you for talking your time, this helped me a lot!

Ответить
@pritech8302
@pritech8302 - 22.12.2021 21:16

thank you sir

Ответить