Hacker News new | ask | show | jobs
by maxxk 1428 days ago
However, these 100 LOC probably could be split into an internal library function which won't change until necessary. If you use an external library (especially in JS and especially in frontend), you or your successor will have to update all these 5 LOC entries all over the code every 1-1.5 years in a non-trivial way when a new major version arrives.

For example, the migration guide for react-query: https://tanstack.com/query/v4/docs/guides/migrating-to-react...

1 comments

That's why you can use fixed library versions to make sure nothing changes. If you need to update something in the library, you can apply a patch and keep going.