Post by Urahara!! ..

Urahara!! ..
@urahara • #show  • 17 Oct, 24(edited)

1 . FrontEnd Challenge (Select All checkboxes)

Implemented a selectAll checkbox

Learnings and Resources :

  1. (sharing state between components)[https://react.dev/learn/sharing-state-between-components]

  2. Usestate allows the setter function to take previous state as input argument to callback function
    setCheckedItems( prev => ({...prev ,[id] :!prev[id]}))

  3. (Using use reducer in ts )[https://www.totaltypescript.com/how-to-type-array-reduce]

Problem [ https://www.algochurn.com/frontend/select-all-checkboxes]

My Solution [https://github.com/Tejaannamdevula/FrontendPractice/tree/main/checkboxSelector]


--- URAHARA!!

Your upvotes and feedback are welcome!

Words have more power than we think. Be kind.