Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StateUtils.pop ,StateUtils.push, StateUtils.replaceAt, StateUtils.reset... is not a function #17

Open
deno028 opened this issue Jan 29, 2018 · 0 comments

Comments

@deno028
Copy link

deno028 commented Jan 29, 2018

NavigationExperimental
on RN 43 deprecated.
on RN 44 removed.

So that the getStateUtils() always return {};

Solutions:

For those who stills using NavigationExperimental after RN 0.44:

  1. Install the Package:
    npm install --save react-native-navigation-experimental-compat

  2. Modify code from: node_modules/react-native-navigation-redux-helpers/dist/index.js:

-function getStateUtils() {
-	  try {
-	    var _require = __webpack_require__(5);
-	    var NavigationExperimental = _require.NavigationExperimental;
-	    return NavigationExperimental.StateUtils;
-	  } catch (e) {
-	    // no-op
-	  }
-	  return {};
-	}
> +function getStateUtils() {
> +	  try {
> +	    var _require = __webpack_require__(5);
> +	    var NavigationExperimental = require('react-native-navigation-experimental-compat');
> +  	    return NavigationExperimental.StateUtils;
> +	  } catch (e) {
> +	  console.log('getStateUtils exception: ',e)
> +	    // no-op
> +	  }
> +	  return {};
> +	}
> 

React Native: 0.52.1
React: ^16.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant