ItsJonQ / g2

✨ An experimental reimagining of WordPress components
http://g2-components.com/
MIT License
105 stars 12 forks source link

Remove need for memoization in accordion #255

Closed sarayourfriend closed 3 years ago

sarayourfriend commented 3 years ago

By moving action functions into module level functions we remove the need to memoize them. Their signature expands but not to the point of being unweildy.

Just an interesting approach to this problem, may or may not be something we adopt.

https://twitter.com/dan_abramov/status/1125774170154065920

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/itsjonq/g2/h8y1gxat0
✅ Preview: https://g2-git-add-context-module-funcs.itsjonq.vercel.app