Currently in the codebase, we have callsites where we're using the useMemo hook with the classNames library. This is unnecessary as useMemo returns a memoized value, which in this case is just a string and hence safe to run on every render.
https://linear.app/comm/issue/ENG-2287/[web]-do-not-wrap-classnames-in-reactusememo
Details
Details
- checked for all occurences by git grep 'React.useMemo(() => classNames' -- *.js as well as a VS Code search.
- started and interacted with the web app to ensure nothing became broken along the way
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Branch
- master
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Comment Actions
I *do* want to be subscribed to all diffs, though :)
sorry, noted! :)
No worries, it's your first diff. Congrats on getting it out!
Comment Actions
Ah sorry that's my bad, I usually schedule a sync/call going through Phabricator and putting up first diff... which I skipped because you'd worked with Phabricator in the past. Still should've at least sent the Notion docs and explained the norms around adding reviewers and whatnot.