Comments (19)
Also having this issue with <Slider />
from react-native-elements.
Having the same issue. Is there an update on where this might be fixed?
from react-native-elements.
<Overlay/>
same error ("react-native-elements": "^3.4.3",)
Warning: Overlay: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
from react-native-elements.
This wonderful library looks like the maintainer has run out of steam recently. Maybe you could fork it with your fix? Then PR against the main repo so they can merge/comment on it, or if they never do your fixed fork becomes the latest.
from react-native-elements.
Have the same warning
from react-native-elements.
Same here, having the same issue with <Slider />
from react-native-elements.
Same problem here with <Dialog.Loading />
from react-native-elements.
Same issue in <CheckBox />
But with TextElement:
"Use JavaScript default parameters instead. %s TextElement"
from react-native-elements.
Yeah, we are also having the warning with the component, the only thing I've seen as a workaround / temp fix for this has been people suppressing the warn but I don't think that is the correct approach. I think likely may require an underlying code change for the components in this library and waiting until that happens 😢
from react-native-elements.
Same issue for here, any updates?
from react-native-elements.
same issue :(
from react-native-elements.
Same issue
from react-native-elements.
Same issue in
<CheckBox /> <ButtonGroup/>
from react-native-elements.
Same issue (with Dialog.Button), running rneui 4.0.0-rc.7
ERROR Warning: Dialog.Button: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
issue probably here:
seems it stems from recent changes in react 18.13.1: facebook/react#29233
probably needs a fix in all components 🥵
from react-native-elements.
I also have the same issue with version 3.4.3
from react-native-elements.
Also having this issue with AirbnbRating (ver. ^4.0.0-rc.8)
from react-native-elements.
same issue here : import {Dialog} from '@rneui/themed';
Warning: Dialog.Button: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
from react-native-elements.
Hello all, I have a workaround for this problem - not a solution! But works while we wait, by applying a patch to the rneui library you can eliminate the warning. I had a warning regarding defaultProps on the Slider component as some of you have had - however this workaround should work for any similar components.
If you are using yarn in your project its a relatively easy workaround, you can run
yarn patch @rneui/base
This will create & output a temporary directory where you can work on the file/files in question that are causing you trouble. For me this was converting the slider's default props to use parameters in the functions signature itself.
Once you have made your patch and removed the use of defaultProps, yarn will have output a command you need to run to reintroduce the patch to your package, it'll look something like:
yarn patch-commit -s {temp directory location}
Then remember to commit this patch to your version control and make sure a .gitignore
isn't blocking the .yarn/patches
folder.
If you're not using yarn, you can use https://www.npmjs.com/package/patch-package to do the same process.
Those of you with the Dialog issue, it looks like you'll want to look in the temp created folder at dist/Dialog/Dialog.Button.js
at line 21 and convert the default props.
Not perfect I'm aware but it eliminates warnings and doesn't take too long to sort out. Hope this helps! 👍
Code for the Slider changes: https://gist.github.com/Luke-lsm/ac25bc6d4b5cc75734cca2caf3a8d02e
from react-native-elements.
Related Issues (20)
- SearchBar has no Cancel button on iOS HOT 4
- TextProps are extended by ListItem.Content instead of ListItem.Title
- Show default image when source load fail HOT 1
- Cannot use Button as child of Link. HOT 2
- clearIcon in SearchBar component does not theme for dark mode (still appears light)
- Virtualized List error when adding a flatlist inside bottomsheet. HOT 1
- [Feature Request]Classification selector
- Slider disabled prop is not working. HOT 2
- CheckBox icon cannot be seen HOT 1
- Add `ScrollViewProps` or `ScrollViewStyle` to Tab component props
- DimensionValue typing HOT 1
- Avatar maintains image despite setting to null HOT 3
- BottomSheet : The onBackdropPress action is not launched on the new architecture
- Moving to draft as we're waiting for a screenshot
- @types/react-native-vector-icons has dependency of deprecated @types/react-native
- ButtonGroup: allow style props to be methods
- Issue with Dialog.Button - Support for defaultProps will be removed
- Skeleton width and height typings are number | undefined (missing string)
- Navigation Sidebar is not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-elements.