You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting a warning on the browser console "Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.".
This happened post upgrade to the following:
React: 18.2.0
react-tracking: 9.3.2 (tried downgrading till 9.2.1, below versions require 16.8.0 or 17.x)
@types/react-tracking: 8.0.0
Details
The warning is shown on components that either has class component (hence using the decorator @track({<DETAILS>})) and in functional components (using the export default track({<DETAILS>})(Componentx))
On trying with the packages hook, the warning is not shown. const { Track, trackEvent } = useTracking({<DETAILS>});
NOTE: React project is written in Typescript.
The text was updated successfully, but these errors were encountered:
Issue
Getting a warning on the browser console "Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.".
This happened post upgrade to the following:
Details
The warning is shown on components that either has class component (hence using the decorator
@track({<DETAILS>})
) and in functional components (using theexport default track({<DETAILS>})(Componentx)
)On trying with the packages hook, the warning is not shown.
const { Track, trackEvent } = useTracking({<DETAILS>});
NOTE: React project is written in Typescript.
The text was updated successfully, but these errors were encountered: