It will work if the dataset is large, with some optimizations like: 1: we can use useCallback to memoize the results const moveUpward = useCallback((index) => {}, [locations]); const moveDownward = useCallback((index) => {}, [locations]); 2: Using a key prop; to ensure each mapped item has a unique key prop 3: We can use a library react-window; to only render the visible portion of the list
Bro ma na recently flipkart project aap ka complete daikha hai MERN stack ka. Bohat si cheezein seekhna ko mili. Bro us ma aap na redux store ka jo use kia. Kia ab in 2024 ma bi Hamain Wohi tareeqa use karna chahiye ya redux toolkit ka use karain. Aur agar redux toolkit ka use karna chahiye to kindly us pr bi aik complete video banaa dein project ki Surat ma ya jesa bi aap ko sai lagaa. Ya already aap na banai hai to kindly mujhay us ka link send kar dein❤
You can use both, the basic concept is same; with redux toolkit you will get syntax improvements. You can check the below video for redux toolkit implementation ua-cam.com/video/0UJ8TPg1yiE/v-deo.html
Watch the next video in React Interview Machine Coding Series
ua-cam.com/video/stT1O2WZTWw/v-deo.html
Thank you very much Sir❤❤❤❤❤
welcome.
Awesome series ❤
Thanks a ton
Very nice explanation. But will this solution work when the dataset is very large? And how can we optimize it?
It will work if the dataset is large, with some optimizations like:
1: we can use useCallback to memoize the results
const moveUpward = useCallback((index) => {}, [locations]);
const moveDownward = useCallback((index) => {}, [locations]);
2: Using a key prop; to ensure each mapped item has a unique key prop
3: We can use a library react-window; to only render the visible portion of the list
Bro ma na recently flipkart project aap ka complete daikha hai MERN stack ka. Bohat si cheezein seekhna ko mili. Bro us ma aap na redux store ka jo use kia. Kia ab in 2024 ma bi Hamain Wohi tareeqa use karna chahiye ya redux toolkit ka use karain. Aur agar redux toolkit ka use karna chahiye to kindly us pr bi aik complete video banaa dein project ki Surat ma ya jesa bi aap ko sai lagaa. Ya already aap na banai hai to kindly mujhay us ka link send kar dein❤
You can use both, the basic concept is same; with redux toolkit you will get syntax improvements. You can check the below video for redux toolkit implementation
ua-cam.com/video/0UJ8TPg1yiE/v-deo.html
correction in moveDownward funtion if (index === data.length - 1) return;
glad you are paying attention to the details ✔