From ab4209962f8d71525946a9c079c08e18cc93fd55 Mon Sep 17 00:00:00 2001 From: Ian Latour Date: Tue, 30 Jul 2024 18:28:06 -0300 Subject: [PATCH] [FIX] - readme links and nav title --- README.md | 6 +++--- docs/navigation.md | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 89ea86f..4f3dc92 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ ### Glossary 1. **[Home](./index.md)** -2. **[Environment Setup](docs/network.md)** -3. **[Navigation](docs/navigation.md.md)** -4. **[State Management](docs/state.md.md)** +2. **[Environment Setup](docs/setup.md)** +3. **[Navigation](docs/navigation.md)** +4. **[State Management](docs/state.md)** 5. **[Network Management](docs/network.md)**
diff --git a/docs/navigation.md b/docs/navigation.md index ff4601a..654704b 100644 --- a/docs/navigation.md +++ b/docs/navigation.md @@ -4,7 +4,7 @@ layout: default nav_order: 3 --- -# Expo Router +# Navigation ( with Expo Router) Expo router is a multi-platform routing framework for react native and web applications. Is important to mention that It uses a **FILE-BASED** method to determine routes inside your app. @@ -13,20 +13,20 @@ The basic structure would be as follows: Mobile Development
-### Installation +## Installation Expo router is included when creating a default expo project using the following command: `npx create-expo-app AppName` -### How do \_layout files work? +## How do \_layout files work? In the root `_layout`, it is recommended to insert the necessary providers, such as authentication, state management tools, context, themes, etc. In Expo Router, each subfolder created generates what are called 'Route Groups', which can contain their own layout. The layout acts as a sort of middleware for the routes (files) within that folder, allowing us to configure the stacks, tabs, and routes we want to have within each layout. Additionally, any extra logic needed for that subgroup of routes can be added. It is important to remember that routes must have a unique name globally. Their names must match the existing file for that route, and stack options can be customized by declaring the stack in the respective layout file. It is also important to note that if a folder does not contain a layout, Expo Router automatically generates the stack based on the existing files and their names. As a reminder, you can use `useRootNavigationState` from expo-router to debug the navigation state. -### Authentication +## Authentication For authentication, remember that with Expo Router, all routes are always defined and accessible. You should use runtime logic to redirect users away from specific screens depending on whether they are authenticated. @@ -51,17 +51,17 @@ It would look something like this: Expo Router redirects to the index file of the folder or subfolder it finds. If an index file is not found, it generally may not locate a valid initial route. If there are multiple folders containing an index file, Expo Router will follow the alphabetical order of these folders rather than the order in which routes are defined in the stack. -### Tips +## Tips Screen con bottom tab sin tab button: To have a route available within a tab stack without displaying the tab button, you can create the file for that route, then define the tab screen in the layout, and in the options for that tab screen, set href:null. The route will exist in the tab stack and will continue to display the bottom tab bar when represented, but without having its own button. -### Sources +## Sources -https://docs.expo.dev/router/ -https://docs.expo.dev/router/advanced/root-layout/ -https://docs.expo.dev/router/advanced/tabs/ -https://docs.expo.dev/router/advanced/stack/ +https://docs.expo.dev/router/ +https://docs.expo.dev/router/advanced/root-layout/ +https://docs.expo.dev/router/advanced/tabs/ +https://docs.expo.dev/router/advanced/stack/