The below is a quick summary of steps to take when migrating from v1 to v2 of RNFirebase. Please see the [v2 change log](https://github.com/invertase/react-native-firebase/releases/tag/v2.0.0) for detailed changes.
##### 1) Install the latest version of RNFirebase:
> `npm i react-native-firebase@latest --save`
##### 2) Upgrade react-native version (only if you're currently lower than v0.40):
> For example: `npm i react-native@0.44.0 react@16.0.0-alpha.6 --save`
##### 3) Update your JS code to reflect deprecations/breaking changes:
- [deprecated] providerId should now be used instead of provider whilst obtaining auth credentials. The latter will be removed in future releases.
- [deprecated] Deprecated User.getToken in favour of User.getIdToken.
- [breaking] User.reauthenticate has been removed in favour of User.reauthenticateWithCredential.
- [breaking] User.link has been removed in favour of User.linkWithCredential.
- [breaking] Removed unnecessary didReceiveNotificationResponse and willPresentNotification methods for iOS messaging. Added additional didReceiveRemoteNotification method.
- [breaking] firebase.messaging().onTokenRefresh and firebase.messaging().onMessage return a function to unsubscribe as per the Web SDK spec: https://firebase.google.com/docs/reference/js/firebase.messaging.Messaging#onMessage. Previously they returned an object with a .remove() method.
As all firebase modules are now optional you only need to import the Firebase functionality that you require in your application. Simply update your Podfile to only include the Firebase modules for functionality that you require in your app.
For example if you only use Auth and Storage in your app then your podfile would look like the below: