Skip to content
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

Expand useTracking API to accept contextual data #168

Merged
merged 18 commits into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions src/ReactTrackingContext.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import React from 'react';

export default React.createContext({});
4 changes: 1 addition & 3 deletions src/__tests__/e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -711,9 +711,7 @@ describe('e2e', () => {
});

it('root context items are accessible to children', () => {
const {
ReactTrackingContext,
} = require('../withTrackingComponentDecorator'); // eslint-disable-line global-require
const ReactTrackingContext = require('../ReactTrackingContext').default; // eslint-disable-line global-require

const App = track()(() => {
return <Child />;
Expand Down
Loading