From a0f49fcbd5705d5e387ee1227fe5d6c4b41ea343 Mon Sep 17 00:00:00 2001 From: Eric Vicenti Date: Thu, 2 Mar 2017 10:56:22 -0800 Subject: [PATCH] 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 --- .../NavigationExperimental/NavigationExperimental.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Libraries/NavigationExperimental/NavigationExperimental.js b/Libraries/NavigationExperimental/NavigationExperimental.js index 4f1bb068c..c4fd955c8 100644 --- a/Libraries/NavigationExperimental/NavigationExperimental.js +++ b/Libraries/NavigationExperimental/NavigationExperimental.js @@ -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,