Questions tagged [react-location]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
33 views

How to pass state/data with useNavigate hook in react-location?

I have been trying to pass a state to the other page via route while using the useNavigate hook in the react-location. I looked all over the internet for it and couldn't find a solution. All the ...
Sanjay Joshi's user avatar
  • 2,036
0 votes
1 answer
255 views

How to Scroll to the top on page change in React Location?

How to make ScrollToTop component like in React Router? I would like to move page view to the top on page change. Here's an example: index.js import React from "react"; import ReactDOM from &...
Antonio112009's user avatar
2 votes
1 answer
322 views

How to create a compass that points to specific coordinates (React-Native)

Here is what I have for now: import { Alert, Animated, Easing, Linking, StyleSheet, Text, View, } from "react-native"; import React, { useEffect, useState } from "react&...
Rémi-Antoine Joron's user avatar
0 votes
1 answer
55 views

How should I modify my code so that it continuously rotates the arrow so that it always points at the given coordinates? (Making a compass)

This is what I have for now but I have no idea how to make it so that rotateImage gets called every time angle is modified. That will allow me to animate the arrow and make it point at the given ...
Rémi-Antoine Joron's user avatar
1 vote
2 answers
307 views

Difference between getCurrentPositionAsync and watchPositionAsync and why doesn't anything show up

I'm trying to get the position of the user and have it constantly updating and showing on the screen. I simply can't figure out why this isn't working :( Here's my code: import { Alert, Linking, Text, ...
Rémi-Antoine Joron's user avatar
0 votes
0 answers
65 views

Pass data with react-location from one page to another page

Heyy, Currently I am using react-location for routing and I am new with it. I want to pass data from one page to another. Is there any way to do it.I have read the documents but i am unable to find ...
Nisarg's user avatar
  • 57
0 votes
1 answer
176 views

React Location Router doesn't work after changing state in Redux

I'm using @tanstack/react-location in React Typescript project + 'react-redux'. When I change redux auth state (login, logout) I also make my MainNavigation changing. Some Links are added or removed. ...
vasily's user avatar
  • 31
1 vote
0 answers
166 views

Routing query params without slash before it in react-location

Previously, I was using react-router-dom. With react-router-dom, I could define a route with query params like this: <Route path="/p:productId" element={<Products />} /> // ...
Caio Gomes's user avatar
1 vote
1 answer
1k views

Jest Cannot Find Module react-location

I am using create-react-app without ejecting. Tests were working all fine until my PRs starting failing with npm ERR! npm ci can only install packages when your package.json and package-lock.json or ...
moinhaque's user avatar
  • 220
0 votes
1 answer
91 views

Why don't my components rerender when I switch to another URL?

I using react-location library. When I typing URL and click enter it works correctly but when I switch to another URL using Link the content doesn't change. I think its because component is not ...
asus18019's user avatar
1 vote
2 answers
2k views

How to preload data before rendering react app

i use React location library. Want to get token from cookie if it exist then send it to server to check if it is active. My question is how i can do this once before rendering app regardless of route? ...
asus18019's user avatar
0 votes
1 answer
1k views

How to lazy load route with react location?

I am quite new to React, and I have a project that uses react-location I would like to load some routes lazily only if the path is activated. My current config is: my base routing module export const ...
Bobby's user avatar
  • 4,422
2 votes
2 answers
6k views

React Router V6 Async Route Loader

Have been checking out React Location and it has a very useful feature (Asynchronous Routing, Prefetching) and am wondering if this is possible in React Router V6. For example, they support Async ...
Rolando MC's user avatar