Skip to content

defaultProps being deprecated #66

@ethan-carlson

Description

@ethan-carlson

Describe the bug
React defaultProps is scheduled to be deprecated in the next major release, 18.3: see here

To Reproduce
Steps to reproduce the behavior:
Mounting ImageMapper with React 18.2 generates this warning.

Error Stack
Warning: ImageMapper: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. at ImageMapper (webpack-internal:///(app-client)/./node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/react-img-mapper/dist/ImageMapper.js:60:30)

Expected behavior
Change the default props syntax to the ES6 standard to remove this warning and prevent future bugs. See an example in this thread.

Screenshots
N/A

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or requesthelp wantedExtra attention is neededquestionA valid question

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions