React-native: TypeError:expected dynamic type 'string', but had type 'object'

Created on 5 Jul 2017  Â·  2Comments  Â·  Source: facebook/react-native

  1. react-native : 0.45.1
  2. node : 6.3.1
  3. npm : 3.10.3

  4. Android

  5. Development Operating System : macOS X EI Capitan
  6. Build tools : Android 25.0.0

After I upgrade the react version from 0.29.0 to 0.45.1, I got the following error:

TypeError:expected dynamic type 'string', but had type 'object'

device-2017-07-05-201151

It's been bother me for a few days, anyone who know how to solve this would be appricated.

Locked

Most helpful comment

Sounds like you might be calling the Alert native module with old/incorrect params? Just a guess.

All 2 comments

Sounds like you might be calling the Alert native module with old/incorrect params? Just a guess.

Yes, I saw the code of Alert.js and figured out that this error is due to I call the Alert with a param of 'error' which is a object not a string anymore. The strange thing is this happened after I upgraded the react native version from 0.29.0 to 0.45.1.

Was this page helpful?
0 / 5 - 0 ratings