reactstrap
reactstrap copied to clipboard
chore(fixes #2801): use function default parameters
chore(fixes #2801): use function default parameters instead of defaultProps
- [x] Bug fix
- [ ] New feature
- [x] Chore
- [ ] Breaking change
- [x] There is an open issue which this change addresses
- [x] I have read the CONTRIBUTING document.
- [x] My commits follow the Git Commit Guidelines
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] My change requires a change to Typescript typings.
- [ ] I have updated the typings accordingly.
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.
@illiteratewriter please check these changes.
Please, update all the components that use defaultProps.
LGTM
What is the reason for not using Javascript default props?
What is the reason for not using Javascript default props?
Ah, because even undefined props are set (by the prop types?) to undefined and would override the default props.
I'm still seeing this issue with v9.2.3 on the Popover component
console.js:288 Warning: Popover: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. at Popover (http://localhost:3000/static/js/bundle.js:503660:95)
I'm still seeing this issue with v9.2.3 on the Popover component
console.js:288 Warning: Popover: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. at Popover (http://localhost:3000/static/js/bundle.js:503660:95)
same for tooltip and popover component...