Nativebase: Unsafe legacy lifecycles warring for Pickers

Created on 17 Aug 2019  路  10Comments  路  Source: GeekyAnts/NativeBase

I have gone through these following points

Issue Description

Adding picker component to any page throws following warning:


Warning: Unsafe legacy lifecycles will not be called for components using new component APIs.

%s uses %s but also contains the following legacy lifecycles:%s%s%s

The above lifecycles should be removed. Learn more about this warning here:
https://fb.me/react-async-component-lifecycle-hooks, Styled(PickerNB), getDerivedStateFromProps(), ,
UNSAFE_componentWillReceiveProps,


node, npm, react-native, react and native-base version, expo version if used, xcode version

native-base: 2.13.5,
expo: 34.0.4

,

Steps to reproduce

Just add Picker to the page.

Is the bug present in both iOS and Android or in any one of them?

Only on IOS

Screenshot 2019-08-17 at 23 06 07

warning

Most helpful comment

Fixed in 2.13.8

All 10 comments

same here, IOS only

same issue as well:
native-base: 2.13.5
expo: 32.0.0

The picker still seems to work as normal, I just get the warning every time I navigate to that screen.

I have also noticed this with the version of react-native-keyboard-aware-scroll-view v0.8 which is being bundled with the latest version of native-base which is using react deprecated lifecycle method componentWillReceiveProps can you please update to use library to latest v0.9.1 which resolves this issue.

Same here (same as OP).

Same

same. We hope someone will submit a PR for this warning.

Can we try it with the latest version 2.13.7 and see if the issue still persists?

@sankhadeeproy007 Still having the issue with 2.13.7

package-lock.json:
Screen Shot 2019-09-09 at 9 53 32 AM

in-app screenshot:
IMG_5370A91DBB64-1

warning from terminal:

[09:52:54] Warning: Unsafe legacy lifecycles will not be called for components using new component APIs.

%s uses %s but also contains the following legacy lifecycles:%s%s%s

The above lifecycles should be removed. Learn more about this warning here:
https://fb.me/react-async-component-lifecycle-hooks, Styled(PickerNB), getDerivedStateFromProps(), ,
  UNSAFE_componentWillReceiveProps,

Exact same problem for me, any updates?

Fixed in 2.13.8

Was this page helpful?
0 / 5 - 0 ratings

Related issues

inv2004 picture inv2004  路  3Comments

sihemhssine picture sihemhssine  路  3Comments

natashache picture natashache  路  3Comments

Bundas picture Bundas  路  3Comments

nschurmann picture nschurmann  路  3Comments