Add deprecation warning for NavigationExperimental

Summary: Starting in RN 0.43, lets start recommending people to move off of NavExperimental, now that a better navigation option is available, and hybrid options on the horizon.

Reviewed By: hramos

Differential Revision: D4634268

fbshipit-source-id: 2f37cc62f9729ae123d85f609a88f84516a5ae92
This commit is contained in:
Eric Vicenti 2017-03-02 10:56:22 -08:00 committed by Facebook Github Bot
parent 0cb2bc104f
commit a0f49fcbd5
1 changed files with 12 additions and 0 deletions

View File

@ -18,6 +18,18 @@ const NavigationPropTypes = require('NavigationPropTypes');
const NavigationStateUtils = require('NavigationStateUtils');
const NavigationTransitioner = require('NavigationTransitioner');
const warning = require('fbjs/lib/warning');
// This warning will only be reached if the user has required the module
warning(
false,
'NavigationExperimental is deprecated and will be removed in a future ' +
'version of React Native. The NavigationExperimental views live on in ' +
'the React-Navigation project, which also makes it easy to declare ' +
'navigation logic for your app. Learn more at https://reactnavigation.org/'
);
const NavigationExperimental = {
// Core
StateUtils: NavigationStateUtils,