nytimes / react-tracking

🎯 Declarative tracking for React apps.
https://open.nytimes.com/introducing-react-tracking-declarative-tracking-for-react-apps-2c76706bb79a
Other
1.87k stars 123 forks source link

Re-export deepmerge for convenience #196

Closed tizmagik closed 2 years ago

tizmagik commented 2 years ago
import { deepmerge } from 'react-tracking';
tizmagik commented 2 years ago

Yea I mean technically folks should have an explicit dependency on deepmerge if they need it, but the use case that came up recently was wanting to add additional tracking context lazily as part of the dispatch call and there was no built-in way to support that so ended up having to do a bunch of ...spreading, making sure to spread nested properties otherwise they'd get blown away. Deepmerge simplifies that and having it re-exported seemed like a good convenience without too much fuss.