Permalink
Browse files

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
  • Loading branch information...
ericvicenti authored and grabbou committed Mar 2, 2017
1 parent c72a448 commit 39eddc1a56442021f02f3ec69c6810b185740f43
Showing with 12 additions and 0 deletions.
  1. +12 −0 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,

4 comments on commit 39eddc1

@JodiWarren

This comment has been minimized.

Show comment
Hide comment
@JodiWarren

JodiWarren Mar 31, 2017

Contributor

@ericvicenti Is there currently any schedule for removal, either firm or estimated? I'm just trying to plan out our transition to a different library.

Contributor

JodiWarren replied Mar 31, 2017

@ericvicenti Is there currently any schedule for removal, either firm or estimated? I'm just trying to plan out our transition to a different library.

@nihgwu

This comment has been minimized.

Show comment
Hide comment
@nihgwu

nihgwu Mar 31, 2017

Contributor

@JodiWarren It's already removed from the core in master branch

Contributor

nihgwu replied Mar 31, 2017

@JodiWarren It's already removed from the core in master branch

@JodiWarren

This comment has been minimized.

Show comment
Hide comment
@JodiWarren

JodiWarren Mar 31, 2017

Contributor

@nihgwu Does that mean that it's likely to be removed in 0.44 then?

Contributor

JodiWarren replied Mar 31, 2017

@nihgwu Does that mean that it's likely to be removed in 0.44 then?

@kevinmcampos

This comment has been minimized.

Show comment
Hide comment
@kevinmcampos

kevinmcampos Apr 5, 2017

As someone who doesn't use NavigationExperimental, it took me a long time to find React-Navigation project.
It will be reffered on the Navigation guide later?

kevinmcampos replied Apr 5, 2017

As someone who doesn't use NavigationExperimental, it took me a long time to find React-Navigation project.
It will be reffered on the Navigation guide later?

Please sign in to comment.