Skip to content
Open
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
4 changes: 4 additions & 0 deletions packages/react-meteor-data/withTracker.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { forwardRef, memo } from 'react';
import { useTracker } from './useTracker';
import { Meteor } from 'meteor/meteor';

type ReactiveFn = (props: object) => any;
type ReactiveOptions = {
Expand All @@ -10,6 +11,9 @@ type ReactiveOptions = {

export const withTracker = (options: ReactiveFn | ReactiveOptions) => {
return (Component: React.ComponentType) => {
if (Meteor.isDevelopment) {
console.warn('It appears that you are using withTracker. This approach has been deprecated and will be removed in future versions of the package. Please migrate to using hooks.')
}
const getMeteorData = typeof options === 'function'
? options
: options.getMeteorData;
Expand Down