We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
React 19 is phasing out defaultProps and React 18.3.1 is throwing deprecation warnings
The text was updated successfully, but these errors were encountered:
I don't think there will be any response, but I created patch file for this issue and pull request. About patch-package
Patch file:
diff --git a/lib/component/stringify.js b/lib/component/stringify.js index 861dcbc8aa9c4d7ff7440b230c5416a59f6d4d72..788ce6e8d8c530565aad9e3fbcd956c5f620df7e 100644 --- a/lib/component/stringify.js +++ b/lib/component/stringify.js @@ -8,13 +8,12 @@ module.exports = R.curry(function stringify (opts, tree) { 'var React = require(\'react\');', '', 'function ' + displayName + ' (props) {', + 'props = {...' + JSON.stringify(tree.props || {}) + ', ...props};\n', ]; var postamble = [ '}', '', - displayName + '.defaultProps = ' + JSON.stringify(tree.props || {}) + ';', - '', 'module.exports = ' + displayName + ';', '', displayName + '.default = ' + displayName + ';',
Sorry, something went wrong.
No branches or pull requests
React 19 is phasing out defaultProps and React 18.3.1 is throwing deprecation warnings
The text was updated successfully, but these errors were encountered: