Closed jbadeau closed 5 years ago
Thanks @jbadeau this is a great start and makes a lot of sense to want to allow folks to customize the merging strategy. Thanks for the PR and the additional tests!
I think however what you're looking to do might already be supported to some extent? Because react-tracking uses deepmerge under the hood, by default it will append arrays.
Here's a quick Codesandbox example showing the breadcrumbs use case you outlined here: https://codesandbox.io/s/young-mountain-in98p
Does this cover your use case, or do you have additional needs for customizing the merging strategy?
To be honest, this was something I wrote last year. I need to look at the use case again. I will get back to you later this week.
Hey @jbadeau I'm going to close this since the code has drifted significantly since then, but please feel free to re-open a fresh PR or start with an issue to explore your use case! Thanks again!
Hi,
I have done a simple change to allow for custom tracking data merge strategies. I'm a bit new to the context so if you see something odd please let me know. Test and docs included