Comments (4)
Could you give me some more details as to what you mean by authorised URLs, and how you'd like to handle them?
from navi.
Sure. I'm just thinking of URLs that require a login, such as /inbox
. Is there a built-in way to handle that (like a way to pass a callback function) or is it just a matter of how one implements their Converters, Junctions, Locations, or Routes?
Ideally it would be a great addition to the Guide or Examples page.
from navi.
I agree that it would be nice to have a guide for this.
There is no built in way to handle it, but it is definitely possible. Given the converter just converts a URL into a Route
, you'll just need to look at the Route
and decided whether the user is authenticated before rendering any content.
from navi.
Thanks.
from navi.
Related Issues (20)
- How to set Context inside a route definition? HOT 1
- React Navi is failing in codesandbox.io HOT 2
- Browser router and nested memory router fighting over title
- "Active" prop and "activeStyle" props are broken for Link component HOT 1
- Bug with styles not being passed to Link. HOT 1
- How to match "/:id" and "/:id/edit"?
- navigation.subscribe callback called twice
- structured data isn't inserted into build
- canonical urls are wrong if lazy loading is used
- scroll restoration
- Disable prefetch globally HOT 1
- Why display:none !important? for any element
- How to create a custom boundary? How to catch custom errors?
- React.Strict mode forces the getData to run twice
- Error in Typescript blog example
- Preserve scroll position when going back/forward HOT 1
- build failed on node >= 12 HOT 1
- Is Navi dead? HOT 2
- Redux Toolkit with Navi
- Make docs searchable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from navi.