Skip to content

Conversation

@yr-samuel
Copy link

@yr-samuel yr-samuel commented Jun 25, 2024

Make a modern way to pass defaultProps to component props to avoid throw warning.

Warning: ForwardRef: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.

@antwanvdm
Copy link

Nice work! Can't wait for this to be released :)

@aliceni81
Copy link

Hi, may I know when it would be released?


const AutoHeightWebView = React.memo(
forwardRef((props, ref) => {
forwardRef((props = defaultProps, ref) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems having any one of the prop passed in will override all the defaultProps.

@aliceni81
Copy link

Will this be released? It has been a half year... is the package still be maintained?

@antwanvdm
Copy link

@aliceni81 I don't think so. I'm now using @builder.io/react-native-render-html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants