5 ms·
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 - e
by vhakulinen 7y 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/7d5933b8b06c965480ec3f2d2ccd911a595191a1/src/index.js https://github.com/akash-joshi/local-storage-hook/blob/7d593...
- r0rshrk 7y agoExactly, it can be treated as an example. It's an npm package so that I can reuse the code :)