8000 Document `mergeOptions` by tizmagik · Pull Request #212 · nytimes/react-tracking · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Document mergeOptions #212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Both `@track()` and `useTracking()` expect two arguments, `trackingData` and `op
- `dispatchOnMount`, when set to `true`, dispatches the tracking data when the component mounts to the DOM. When provided as a function will be called in a useEffect on the component's initial render with all of the tracking context data as the only argument.
- `process`, which is a function that can be defined once on some top-level component, used for selectively dispatching tracking events based on each component's tracking data. See more details [below](https://github.com/nytimes/react-tracking#top-level-optionsprocess).
- `forwardRef` (decorator/HoC only), when set to `true`, adding a ref to the wrapped component will actually return the instance of the underlying component. Default is `false`.
- `mergeOptions` optionally provide deepmerge options, check [deepmerge options API](deepmerge-options) for details.

#### `tracking` prop

Expand Down Expand Up @@ -537,3 +538,4 @@ import { deepmerge } from 'react-tracking';
Going forward from version `9.x`, we do not bundle `core-js` (ES6 polyfills) anymore. To support old browsers, please add [`core-js`](https://github.com/zloirock/core-js) to your project.

[deepmerge]: https://www.npmjs.com/package/deepmerge
[deepmerge-options]: https://github.com/TehShrike/deepmerge#options
0