Skip to content

defaultProps on function components is deprecated #418

Open
@davetapley

Description

@davetapley

Describe the bug

Causes:

Warning: Container: Support for defaultProps will be removed from function components in a future major release.
Use JavaScript default parameters instead.
    at Container
(webpack-internal:///(sc_client)/./node_modules/react-bulma-components/cjs/components/container/container.js:27:23)

Sure enough:

And:

const Container = ({ children, max, breakpoint, className, ...props }) => {

Versions

  • react-bulma-components:: 4.1.0
  • react: 18.2.0

Additional context

https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md#deprecate-defaultprops-on-function-components

77 files need patching. I can do it if maintainer will confirm this is still active and will get merged?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions