Warning: BasicScrollToBottomCore: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. #140
I receive following warnings when use this component; My react version is 18.3.1;
Warning: BasicScrollToBottomCore: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
Warning: Composer: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
Warning: BasicScrollToBottom: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
Warning: Panel: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
Warning: EventSpy: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
I receive following warnings when use this component; My react version is 18.3.1;
Warning: BasicScrollToBottomCore: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
Warning: Composer: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
Warning: BasicScrollToBottom: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
Warning: Panel: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
Warning: EventSpy: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
I found they are caused by following legacy usage of
defaultProps
: example:https://github.com/compulim/react-scroll-to-bottom/blob/53844f5bcad22763c75a7903212b26716fd4d333/packages/component/src/BasicScrollToBottom.js#L25BasicScrollToBottomCore.defaultProps = { children: undefined, className: undefined, followButtonClassName: undefined, scrollViewClassName: undefined };