Skip to content

Warning: Dialog.Loading: Support for defaultProps will be removed from function components in a future major release. #3907

@vijaychouhan-rails

Description

@vijaychouhan-rails

Is there an existing issue for this?

  • I have searched the existing issues

Explain what you did

I have used

import {Dialog} from '@rneui/themed';

and Used in component

<Dialog.Loading loadingProps={mainStyle.v2SbSixthTxtColor} />

In react native verion 0.74.1

Its throwing an warning

ERROR Warning: Dialog.Loading: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
in Dialog.Loading
in Themed.DialogLoading

Expected behavior

It should not throw that warning, remvoe defaultProps as its not deprecated and will be removed in next react native version

Describe the bug

I have used

import {Dialog} from '@rneui/themed';

and Used in component

<Dialog.Loading loadingProps={mainStyle.v2SbSixthTxtColor} />

In react native verion 0.74.1

Its throwing an warning

ERROR Warning: Dialog.Loading: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
in Dialog.Loading
in Themed.DialogLoading

Steps To Reproduce

import {Dialog} from '@rneui/themed';

const FixLoader = props => {
  return (
    <Dialog overlayStyle={mainStyle.transparent} isVisible={loading}>
)
}

Screenshots

WhatsApp Image 2024-05-18 at 5 43 41 PM

Your Environment

`npx @rneui/envinfo`
  ```
    Output from `npx @rneui/envinfo` goes here.
    React Native Elements Env Info

 ## Global Dependencies:

No related dependency found

Local Dependencies:

  • @rneui/base : ^4.0.0-rc.8
  • @rneui/themed : ^4.0.0-rc.8
  • react : ^18.2.0
  • react-native : 0.74.1
  • @types/react : ^18.2.67
    
    

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions