Skip to content

feat: docusaurus v2 #669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Feb 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fbdd451
bump docusaurus v2
eriveltonelias Feb 18, 2020
4862632
ignore .docusaurus
eriveltonelias Feb 18, 2020
35b5006
remove .docusaurus
eriveltonelias Feb 18, 2020
f8ede32
remove website1 foldr
eriveltonelias Feb 18, 2020
0396ce9
Merge branch 'source' into @eriveltonelias/docusaurus-v2
eriveltonelias Feb 18, 2020
1f9f4ea
removed docs from sidebar and duplicate assets
eriveltonelias Feb 18, 2020
c4d326b
Merge branch 'source' into @eriveltonelias/docusaurus-v2
eriveltonelias Feb 18, 2020
a4a5114
update docs assets
eriveltonelias Feb 18, 2020
71288b2
Fix issues with merge
satya164 Feb 19, 2020
d55addd
Fix styles
satya164 Feb 19, 2020
b41c188
removed Next version from versions page
eriveltonelias Feb 20, 2020
194c108
add missing funded
eriveltonelias Feb 20, 2020
5608cd8
fix theme for diff and code snippets
eriveltonelias Feb 20, 2020
c76c814
removed copyright text
eriveltonelias Feb 20, 2020
96692ce
Merge branch 'source' into @eriveltonelias/docusaurus-v2
satya164 Feb 21, 2020
d7662c3
fix btn style on getting started
eriveltonelias Feb 21, 2020
c4816fa
Merge branch '@eriveltonelias/docusaurus-v2' of https://github.com/re…
eriveltonelias Feb 21, 2020
48cfbc3
Merge branch 'source' into @eriveltonelias/docusaurus-v2
satya164 Feb 22, 2020
e46a46f
Tweak the videos in docs
satya164 Feb 22, 2020
f616294
Fix videos not playing
satya164 Feb 22, 2020
7b23dce
Merge branch 'source' into @eriveltonelias/docusaurus-v2
satya164 Feb 22, 2020
4d5bd3d
Tweak the landing page
satya164 Feb 23, 2020
b01e639
Add more metadata to blog
satya164 Feb 23, 2020
dfa6fb7
Fix broken links
satya164 Feb 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
node_modules
.DS_Store
.docusaurus
website/translated_docs
website/build/
website/node_modules
website/.docusaurus

website/i18n/*
!website/i18n/en.json
Empty file removed docs/.gitkeep
Empty file.
Empty file removed website/ .nojekyll
Empty file.
33 changes: 33 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Website

This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

```
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
9 changes: 7 additions & 2 deletions website/blog/2018-02-06-react-navigation-1.0.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
title: React Navigation 1.0 (goodbye, beta!)
author: Core Team
authorURL: https://twitter.com/reactnavigation
author: Brent Vatne
author_url: https://twitter.com/notbrent
author_title: Core Team
author_image_url: https://avatars0.githubusercontent.com/u/90494?s=200&v=4
tags: [release, announcement]
---

As of today, React Navigation version 1.0 has been released! To see a list of recent improvements leading up to the release, refer to the “[Renewed Path to React Navigation V1.0](https://github.com/react-navigation/react-navigation/issues/2585)” issue. Thank you to everybody who has filed high-quality bug reports, submitted pull requests, and helped out fellow developers while we were in beta!

<!--truncate-->

This release isn’t meant to be interpreted as a signal that React Navigation is “finished" &mdash; work is already underway on a number of significant changes to the API that aim to make React Navigation easier to use and more powerful. These changes will be run through our [new RFC process](https://github.com/react-navigation/rfcs). For example, the [Navigator View API RFC](https://github.com/react-navigation/rfcs/blob/master/text/0002-navigator-view-api.md) outlines a plan to decouple views from the router in order to make it easier for other navigation APIs, such as [react-native-router-flux](https://github.com/aksonov/react-native-router-flux) and [react-router-native](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-native), to build on top of the same navigation views. We’re also very excited about a plan (no RFC is open yet, but keep an eye out for it) to use [react-native-gesture-handler](https://github.com/software-mansion/react-native-gesture-handler) to run navigation gestures (sliding a drawer open, or swiping back on a stack, for example) on the UI thread using the Animated native driver.

Last week we released an updated version of our [documentation website](https://reactnavigation.org/docs/getting-started.html), built using [Docusaurus](https://docusaurus.io/). We hope that the new documentation will help newcomers get onboarded with the fundamentals of React Navigation, and serve as an ongoing resource to handle specific use cases as you come across them (under the “How do I do..?” section). [Contributions to the documentation are very welcome](https://github.com/react-navigation/react-navigation.github.io).
Expand Down
9 changes: 7 additions & 2 deletions website/blog/2018-04-06-react-navigation-2.0-rc.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
title: 2.0 release candidate
author: Core Team
authorURL: https://twitter.com/reactnavigation
author: Brent Vatne
author_url: https://twitter.com/notbrent
author_title: Core Team
author_image_url: https://avatars0.githubusercontent.com/u/90494?s=200&v=4
tags: [release, announcement]
---

Exactly two months after the release of React Navigation 1.0, we are close to another major version release. We’d like to invite developers that use the library to give the release candidate a try in your app and let us know if you encounter any issues.

<!--truncate-->

```
yarn add react-navigation@^2.0.0-rc.1
```
Expand Down
9 changes: 7 additions & 2 deletions website/blog/2018-05-07-react-navigation-2.0.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
title: React Navigation 2.0
author: Core Team
authorURL: https://twitter.com/reactnavigation
author: Brent Vatne
author_url: https://twitter.com/notbrent
author_title: Core Team
author_image_url: https://avatars0.githubusercontent.com/u/90494?s=200&v=4
tags: [release, announcement]
---

The documentation is now live at https://reactnavigation.org, and v1 lives [here](/docs/en/1.x/getting-started.html).

<!--truncate-->

## Significant breaking changes

The following changes are considered “significant” because they can’t be fixed by search and replace or something that is similarly mechanical.
Expand Down
10 changes: 7 additions & 3 deletions website/blog/2018-11-01-react-navigation-3.0-rc.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
---
title: 3.0 release candidate
author: Core Team
authorURL: https://twitter.com/reactnavigation
author: Brent Vatne
author_url: https://twitter.com/notbrent
author_title: Core Team
author_image_url: https://avatars0.githubusercontent.com/u/90494?s=200&v=4
tags: [release, announcement]
---

We are excited to announce the release candidate of version 3.0 today!

This is the first release where React Navigation depends on a native module outside of React Native core: it now depends on react-native-gesture-handler. This library provides an excellent set of primitives for leveraging the operating systems’ native gesture APIs and has enabled us to fix a variety of issues with stack and drawer navigators. React Navigation also depends on react-native-screens, but you don’t need to install the native module if you prefer not to use it (we have a blog post coming soon that will explain what react-native-screens is and why you may want to use it, or you can watch [this talk](https://www.youtube.com/watch?v=Z0Jl1KCWiag) by the author of the library).

<!--truncate-->

We didn’t get around to every feature that we wanted to land for this release, but we also didn’t want to hold it up further because we expect that you will want to start using it right away - the release includes performance improvements, bugfixes, ergonomics improvements, some handy new features, and a re-organizing of the internals to improve support for web as a target of React Navigation.

Let’s get started with react-navigation 3.0.
Expand Down Expand Up @@ -218,4 +223,3 @@ See a simple web app with Create React App [here](https://github.com/react-navig
----------

Thanks for reading, please post any issues you encounter to https://github.com/react-navigation/react-navigation/issues!

9 changes: 7 additions & 2 deletions website/blog/2018-11-17-react-navigation-3.0.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
---
title: React Navigation 3.0
author: Core Team
authorURL: https://twitter.com/reactnavigation
author: Brent Vatne
author_url: https://twitter.com/notbrent
author_title: Core Team
author_image_url: https://avatars0.githubusercontent.com/u/90494?s=200&v=4
tags: [release, announcement]
---

The documentation is now live at https://reactnavigation.org, and v2 lives [here](/docs/en/2.x/getting-started.html).

This is the first release where React Navigation depends on a native module outside of React Native core: it now depends on react-native-gesture-handler. This library provides an excellent set of primitives for leveraging the operating systems’ native gesture APIs and has enabled us to fix a variety of issues with stack and drawer navigators. React Navigation also depends on react-native-screens, but you don’t need to install the native module if you prefer not to use it (we have a blog post coming soon that will explain what react-native-screens is and why you may want to use it, or you can watch [this talk](https://www.youtube.com/watch?v=Z0Jl1KCWiag) by the author of the library).

<!--truncate-->

We didn’t get around to every feature that we wanted to land for this release, but we also didn’t want to hold it up further because we expect that you will want to start using it right away - the release includes performance improvements, bugfixes, ergonomics improvements, some handy new features, and a re-organizing of the internals to improve support for web as a target of React Navigation.

Let’s get started with react-navigation 3.0.
Expand Down
7 changes: 6 additions & 1 deletion website/blog/2019-09-16-react-navigation-4.0.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
---
title: React Navigation 4.0
author: Satyajit Sahoo
authorURL: https://twitter.com/satya164
author_url: https://twitter.com/satya164
author_title: Core Team
author_image_url: https://avatars2.githubusercontent.com/u/1174278?s=200&v=4
tags: [release, announcement]
---

The documentation is now live at https://reactnavigation.org, and v3 lives [here](/docs/en/3.x/getting-started.html).

In this release, we have removed the navigators from the react-navigation package. The navigators have lived in separate packages for quite a while and you could already use those packages manually, but we still bundled them in the react-navigation package. This made it difficult for us to release significant updates to navigators, because we had to then do a major version release of react-navigation too. By separating the navigator packages there is more freedom to update and improve navigators without any impact on folks that don't use them.

<!--truncate-->

For example, you will find when you install the latest versions of the drawer and tab navigators that the animations are more performant because they use react-native-reanimated to smoothly animate gestures. These have been available in react-navigation-drawer and react-navigation-tabs for several months now but we delayed updating them in react-navigation itself because we did not want to force every user to update.

With this version, you now install the navigators from their respective packages, which means that you can independently update them.
Expand Down
7 changes: 6 additions & 1 deletion website/blog/2019-10-17-react-navigation-native.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
title: React Navigation meets native
author: Michał Osadnik
authorURL: https://twitter.com/mosdnk
author_url: https://twitter.com/mosdnk
author_title: Core Team
author_image_url: https://avatars3.githubusercontent.com/u/25709300?s=460&v=4
tags: [announcement]
---

React Navigation steps firmly into the next level and we’re very excited to announce to you something great happening in React Navigation codebase.

<!--truncate-->

## Make it custom

From the very beginning of React Navigation we have been following the important motto to make navigation experience customizable in every detail. We, front-end engineers, mobile developers and User Experience lovers, have a deep need to make decisions about each layout component.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
---
title: Using React Navigation 5 with UI Kitten
author: Artur Yorsh
authorURL: https://twitter.com/artyorsh
author_url: https://twitter.com/artyorsh
author_title: UI Kitten Team
author_image_url: https://avatars0.githubusercontent.com/u/10753921?s=200&v=4
tags: [tutorial, ui-kitten]
---

This is a guest post by the [UI Kitten](http://akveo.github.io/react-native-ui-kitten) team. If you like this guide, checkout UI Kitten for more!
In this blog post, we'll show a step-by-step guide on using React Navigation 5 with UI Kitten.

<!--truncate-->

## Introduction

The new React Navigation comes with several significant improvements such as [improving animation performance](https://blog.expo.io/re-writing-react-navigation-stack-db6a376522b1) with [gesture-handler](https://github.com/software-mansion/react-native-gesture-handler) and [reanimated](https://github.com/software-mansion/react-native-reanimated) libraries. What's more, it was migrated to TypeScript for improving the quality of your code base with type checking and more. But the biggest update is migrating to component-based API.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
---
title: React Navigation v5 + React Native Paper = ❤️
author: Dawid Urbaniak
authorURL: https://twitter.com/trensik
author_url: https://twitter.com/trensik
author_title: Paper Team
author_image_url: https://avatars0.githubusercontent.com/u/18584155?s=200&v=4
tags: [tutorial, react-native-paper]
---

This is a guest post by the [React Native Paper](https://reactnativepaper.com/) team. If you like this guide, check out React Native Paper for more!

In this blog post, we'll show you how to build a Twitter clone app using React Navigation v5 and Paper.

<!--truncate-->

## Introduction

The React Navigation v5 comes with many great improvements compared to previous version. It not only provides a cross-platform native Stack, but also the API was redesigned from the ground up to allow things that were never possible before. Thanks to the component-based API, all of the configuration is happening inside the **render method**. This means we can access **props**, **state** and **context** and can **dynamically change configuration** for the navigator.
Expand Down Expand Up @@ -429,7 +434,7 @@ The Function that we pass to `header` prop has access to 3 properties:

Thanks to the **scene** property we can access the title of topmost screen on the stack and display it in the header.
**Previous** property tells us if there are any other screens lower on the Stack.
</br>
<br />
Finally, **navigation** property allows navigating to different screens e.g. opening a Drawer.

The thing that we haven't covered yet and it is very important is how to actually navigate between Stack Navigator screens.
Expand Down Expand Up @@ -524,7 +529,7 @@ export const BottomTabs = () => {

When we check the screen of the phone now, we will see a nice looking, material bottom navigation. What's more, Stack Navigator integrates nicely with Tab.Navigator and we can still navigate to the tweet `Details` screen.

</br>
<br />
<img src="/blog/assets/using-react-navigation-5-with-paper/bottom-navigation.gif" height="480"/>

## FAB and Portal
Expand Down Expand Up @@ -920,11 +925,11 @@ export function DrawerContent(props) {
```

Firstly, we get a current theme using `useTheme` hook from Paper. This means we can check `dark` property on it and pass the correct value to `Switch`.
</br>Secondly, we pass a `toggleTheme` function to `TouchableRipple` to toggle theme whenever user presses a Switch.
<br />Secondly, we pass a `toggleTheme` function to `TouchableRipple` to toggle theme whenever user presses a Switch.

You should be able to toggle a switch now and both `Provider` from Paper and `NativeNavigationContainer` from React Navigation will automatically apply correct colors to the components.

</br>
<br />
<img src="/blog/assets/using-react-navigation-5-with-paper/theming.gif" height="480"/>

## Summary
Expand Down
7 changes: 6 additions & 1 deletion website/blog/2020-02-06-react-navigation-5.0.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
title: React Navigation 5.0 - A new way to navigate
author: Satyajit Sahoo, Michał Osadnik
authorURL: https://twitter.com/reactnavigation
author_url: https://twitter.com/reactnavigation
author_title: Core Team
author_image_url: https://avatars1.githubusercontent.com/u/29647600?s=200&v=4
tags: [release, announcement]
---

Exactly two years ago, we published the first stable version of React Navigation. Throughout this time, the library has been actively developed by adding many new features and bug fixes. The essence of React Navigation was that it was a project that was to become not only a project of individual programmers adapting it to their requirements, but a community as a whole, hence the emphasis on versatility, extensibility, and the tendency to reconsider the assumptions if there were such needs. Thanks to this, the Library has been undergoing metamorphosis of both incremental and completely reorganized shape.

<!--truncate-->

This led us to the moment when React Navigation became one of the most popular navigation solutions in React Native and we are incredibly proud of it.

Today is the day, when we want to mark this vision and major refactoring of the project, that has taken place over the last six months, as stable. One could say that this significant change concerned the core library, and therefore the API, which has been developed and made more dynamic.
Expand Down
Loading