Closed AjnaSofthouse closed 3 months ago
I'm experiencing the same issue is there a way to resolve this?
Hi, are there any updates on this?
I am facing this issue as well, a little digging around, I found out that
Day.defaultProps
way of setting default will soon be removed in React Native in favour of new functionality in both JavaScript and React Native
it is now possible to set default directly like this
function(props = {}){
const {prop1 = [], prop2={}} = props
}
I found that Day.js file on 256 is using the soon-to-be-removed Day.defaultProps
A PR removing every reference to defaultProps
in the project and replacing them with a JavaScript way of setting the default
If this is okay, I can submit PR by the weekend. If anyone can do it way faster, It would be awesome
I assume since no one is taking this up, I will go ahead and submit a Pr to fix this.
Sorry @haastrupea , I wasn't patient enough and I went ahead to update the functional component. I also did a quick search, and this is the only functional component with default props, so I'm only changing it
Published 8.0.5
Thanks @haastrupea and @asieraduriz for the fix
Warning: Day: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. in Day