3 ms·
Why do you need to keep state here? I can see calculating the prices dynamicly, but why save and the reuse the result?
by willcipriano 5y ago
Why do you need to keep state here? I can see calculating the prices dynamicly, but why save and the reuse the result?
- MiddleEndian 5y agoThey could be using some node.js framework they don't understand that is silently persisting data.
- dntrkv 5y agoEspecially if they are using isomorphic JS. Globals / singletons are very dangerous when the JS runs on both the server and client.
- jonny_eh 5y agoCaching.
- IanCal 5y ago* Pull data from API for pricing, later add caching * Modify value to give local amount, not realising it's modifying a cached value * Never test refreshing doesn't change the price