• Stars
    star
    132
  • Rank 274,205 (Top 6 %)
  • Language
    TypeScript
  • Created almost 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A new way to create navigation in react-native

React Native Url Router

Documentation page

Motivation

React Native Url Router aims to simplify native navigation patterns.

It allows for native navigation UI that feels natural on mobile together with easy navigation by opening URLs.

It exports Stack and Tab Navigators same as react-navigation, but they are usually closely mapped with an app-wide URL structure.

Being designed to work seamlessly with react-router and it should feel immidiately intuitive to people who used react-router on web.

React Router provides the routing logic, route ranking, matching, params support and more.

React Native Url Router provides a powerful new abstraction over a regular web history stack. It also integrates with react-native-screens providing a fully native stack behavior, and relies on react-native-pager-view for swipeable Tabs.

Usage

<StackNavigator>
    <Route
        path="/"
        element={<NavigateWhenFocused to={loggedIn ? "/app" : "/login" replace />}}
    />
    <Route
        path="/login"
        element={
            <>
            {loggedIn && <NavigateWhenFocused to="/app" replace />}
            <Button onPress={() => setLoggedIn(true)} title="Login" />
            </>
        }
    />
    <Route
        path="/app"
        element={
            <>
            {!loggedIn && <NavigateWhenFocused to="/login" replace />}
            <Button onPress={() => setLoggedIn(false)} title="Logout" />
            </>
        }
    />
</StackNavigator>

Installation

For expo:

expo install react-native-url-router react-native-pager-view react-native-screens react-router history

For regular react native >=0.60:

yarn add react-native-url-router react-native-pager-view react-native-screens react-router history

Also follow https://github.com/software-mansion/react-native-screens#installation for android

Documentation

https://software-mansion-labs.github.io/react-native-url-router/docs/overview

Examples

Check out examples/ for a quick start into using react-native-url-router in your own project.

License

React Native Url Router library is licensed under The MIT License.

More Repositories

1

reanimated-2-playground

Playground app – fresh React Native project with preinstalled Reanimated v2
Java
186
star
2

react-native-swiftui

JavaScript
177
star
3

stack-beautifier

Tool for decrypting stack traces coming from the minified JS code.
JavaScript
111
star
4

react-native-turbo-demo

React Native Turbo - an open source library that can bring your turbo-enabled web application into the React Native world.
Kotlin
105
star
5

expo-maps

Swift
81
star
6

react-native-resource-saving-container

View container that saves resources (bitmaps, camera) by detaching native views when they are not visible
JavaScript
80
star
7

drawings-and-animations-workshop

TypeScript
64
star
8

gradient-shared-transitions-example

JavaScript
44
star
9

elixir-caldav-client

CalDAV client in the Elixir language
Elixir
41
star
10

react-native-hour-format

Get hour format from OS settings.
Java
28
star
11

reanimated-bottom-sheet-video

JavaScript
27
star
12

web3-account

Adapter application for consuming web3 messages from ie. wallets, and passing them on to starknet
TypeScript
20
star
13

react-native-docker-android

Docker image for building React Native apps for Android in clear environment
Dockerfile
18
star
14

react-native-labs

Directory with experimental React Native modules and features
Java
16
star
15

detox-your-graphql

Example app for E2E testing with Detox and Apollo GraphQL Server
JavaScript
14
star
16

react-native-memory-leak-example

Example app that demonstrates how resources could be leaked in React Native apps
JavaScript
11
star
17

appjs-2023-workshop-reanimated

TypeScript
11
star
18

tinymceMathjax

MathJax plugin for tinyMCE v4
HTML
10
star
19

elixir-janus

Bindings for Janus Gateway for the Elixir language
Elixir
10
star
20

elixir-ibm-speech-to-text

Elixir client library for IBM Cloud Speech to Text service
Elixir
8
star
21

appjs-2023-workshop-expo-modules

TypeScript
6
star
22

poke-workshops

Workshops for teaching React Native and Expo
JavaScript
6
star
23

scarb-eject

Create cairo_project.toml for a given Scarb package.
Rust
5
star
24

starknet-android-demo

Kotlin
5
star
25

appjs-2024-workshop-optimization-start

TypeScript
5
star
26

EIP712-cairo-article

Cairo
4
star
27

elixir-gcloud-speech-grpc

Elixir client for Google Cloud Speech-to-Text API using gRPC
Elixir
4
star
28

intro-to-blockchain

Python
4
star
29

protostar-tutorial

Cairo
4
star
30

elixir-janus-transport-ws

Elixir
4
star
31

appjs-2022-workshops-start

Everything you need to know about Fabric and JSI
Java
4
star
32

elixir-janus-plugin-videoroom

Bindings for Janus Gateway for the Elixir language - videoroom plugin API
Elixir
4
star
33

reanimated-parallax

JavaScript
4
star
34

react-native-android-jsc-debugging

Proof of concept for connecting remote debugger to RN's JSC running on Android
Ruby
3
star
35

appjs-2023-workshop-optimization-start

TypeScript
3
star
36

react-native-ai-tutorial

TypeScript
3
star
37

crypto-cpp-py

Python packaged crypto-cpp
Python
3
star
38

workshops-crypto

Python
2
star
39

starknet-workshops-ethwarsaw

Cairo
2
star
40

expo-workshops-agh-2018

Code from SoftwareMansion workshops for AGH UST 2018
JavaScript
2
star
41

expo-workshops

JavaScript
2
star
42

poseidon-py

Poseidon hash Python library
Python
2
star
43

elixir-sftp-toolkit

SFTP Toolkit library for Elixir
Elixir
2
star
44

executorch-style-transfer

Demo app for executorch style transfer tutorial.
C++
2
star
45

reanimated-beta-docs

New Reanimated Documentation
JavaScript
1
star
46

elixir-guerilla

Elixir
1
star
47

eslint-config-swmansion

SoftwareMansion's eslint config
JavaScript
1
star
48

rnos-library-matrix-tester

Run E2E tests of SWM libraries on different versions of React Native and across various configurations.
TypeScript
1
star
49

protostar-workshop-2023

1
star
50

dobra-noc-recorder

Elixir
1
star
51

janus_experiments

Experiments with Janus API
Python
1
star
52

babel-plugin-animated-block

Babel plugin to simplify RN animated expression
Objective-C
1
star
53

reanimated-legacy-docs

Legacy Reanimated Documentation
JavaScript
1
star
54

pokedex

📕 Pokédex 📕 in React Native with use of GraphQL 📝 DIY workshop 🛠
JavaScript
1
star
55

grafana-backup-s3

Tool for backing up & restoring Grafana dashboards and data sources and uploading them to S3 bucket.
Python
1
star
56

elixir-xattr

Elixir library for accessing and manipulating custom extended filesystem attributes
C
1
star