Hacker News new | ask | show | jobs
by vhakulinen 2416 days ago
Is the react hook code so complicated that when it totals up to 17 lines of code[1], it needs to become a npm package? The code it self looks neat and clean - even more reason to just write your own hook.

1: https://github.com/akash-joshi/local-storage-hook/blob/7d593...

1 comments

Exactly, it can be treated as an example. It's an npm package so that I can reuse the code :)