Questions tagged [react-router-native]
33 questions
25
votes
2 answers
how to use react-native-web and react-navigation together and access from web url
UPDATE:
react-navigation web support is done. follow this:
https://reactnavigation.org/docs/en/web-support.html
ORIGIN:
I try to share my code between react-native and web.
when I try react-native-web, it works well.
but there is only one question,…
![](../../users/profiles/535976.webp)
GeminiYellow
- 978
- 11
- 33
5
votes
1 answer
How can I solve the Module parse failed: Unexpected token (11:9) react-router-native
I installed react-native-router using yarn and just on importing NativeRouter
This is how I import from react-router-native
import { NativeRouter, Route, Link } from "react-router-native";
This is the error I…
![](../../users/profiles/6842763.webp)
iamafasha
- 592
- 5
- 18
3
votes
1 answer
react-router-native AndroidBackButton is not firing
i'm using react-router-native with an ejected CRNA app. i've added the component to my as it shows in the docs, but it doesn't seem to be firing.
is there some way i can debug this to see if it's just not getting a…
![](../../users/profiles/1319595.webp)
rkstar
- 1,107
- 12
- 25
2
votes
1 answer
Redirect to View Component from an Axios interceptor (outside of a component) in React Native with React-Router-Native
I am working on a service class to create an instance of Axios (in React Native) where I'm using some interceptors to inject the JWT Token to authenticate against an API.
When the app detects that the access token is expired, automatically use the…
![](../../users/profiles/6107280.webp)
Yulio Aleman Jimenez
- 1,447
- 1
- 15
- 30
2
votes
0 answers
Support for the experimental syntax 'classProperties' isn't currently enabled for react-router-native?
I'm currently learning about setting up a react-native-web that uses TypeScript and am getting an error where react-router-native is throwing an error saying:
Support for the experimental syntax 'classProperties' isn't currently enabled.
Checked…
![](../../users/profiles/4045911.webp)
Warsaw
- 97
- 1
- 10
2
votes
3 answers
Is it possible to apply animation for react-router-native?
I know that this question sounds like asking for suggestion which should not be here, But I am posting after searching a lot for my requirement.
I am using react-router-native for navigation which is great functionality wise. But comes to the…
![](../../users/profiles/8364900.webp)
Mighty
- 1,178
- 2
- 17
- 35
1
vote
0 answers
Technical difference between react-router-native and react-navigation
newbie here at React Native.
react-router is a popular library for navigation in web apps. This same library has a package that provides an API for navigation in RN, react-router-native. Docs
After reading react-navigation's pitch and anti-pitch, I…
![](../../users/profiles/10369999.webp)
salikadave
- 11
- 2
1
vote
0 answers
react-router-native giving error in Expo CLI - React Native
I have installed react-router-native in my project using npm and I am getting an error saying:
E:/myapp/node_modules/react-router-native/NativeRouter.js,
11:9 Module parse failed: Unexpected token (11:9).... You may need an
appropriate loader to…
![](../../users/profiles/14829899.webp)
SK 4
- 15
- 5
1
vote
2 answers
How to pass values or objects with link in react-router-native?
{basicData.studentName}
…
![](../../users/profiles/13080182.webp)
MANOJ H M
- 57
- 1
- 1
- 8
1
vote
0 answers
Is there a better way to test React Native class component functions when using Redux and React Router Native?
I'm trying to write tests in Jest for a React Native project I'm working on. I'm using redux and react-router-native and I can't render the components for the tests without wrapping them in a Provider and MemoryRouter. The component I'm trying to…
![](../../users/profiles/13932079.webp)
Mike Pottebaum
- 11
- 1
1
vote
1 answer
Test using react-router-native's Link blows up with "TypeError: Cannot read property 'default' of undefined"
For a react-native app using react-router, jest and react-test-renderer, the component doesn't seem to be testable. The react-router documentation makes no mention of having to do anything special (mocking?) for react-native and my tests only…
![](../../users/profiles/147380.webp)
outofculture
- 5,156
- 1
- 15
- 20
1
vote
1 answer
react-router-native renders blank page
The logic seems simple, though I've tried a half-dozen permutations to see if anything changes. I have no idea why react-router is behaving this way:
import React from 'react'
import { View, Text } from 'react-native'
import { observer, inject }…
![](../../users/profiles/1911432.webp)
hunterloftis
- 11,934
- 5
- 40
- 45
1
vote
1 answer
react-router-native doesnt work
Error:
undefined is not an object (evaluating '_this.context.router.history')
index.js:
![](../../users/profiles/9251440.webp)
kutirie
- 423
- 1
- 3
- 9
1
vote
3 answers
React router native animation blinks before animation starts
I'm developing a react native app and using React router native v4, and I'm trying to develop the animation part, as suggested by documentation, first I made sure that everything works without animations or transitions.
I've iterated the…
![](../../users/profiles/2051542.webp)
Javier P
- 1,222
- 16
- 21
1
vote
1 answer
React Native Router - Element type is invalid
I'm trying to make routes for the different pages in my React Native app. So I've created a router.js file with a new Router:
// @flow
import React, { Component } from 'react';
import View from 'react-native';
import { NativeRouter, Route,…
![](../../users/profiles/6370502.webp)
Nieck
- 1,499
- 3
- 14
- 39