Fix deleted page redirects

Summary:
The redirects we added inline in the deleted pages don't work when there's a baseUrl.

This is because it's the standard react-router Redirect component, which knows nothing about docusaurus sites.

We could get around that by adding `useBaseUrl()` calls around all of them, but that's not great.
So changing to using declarative redirects instead, where they are all put in config. This automatically takes care of base urls, and reduces copy-pasted code.

Reviewed By: passy

Differential Revision: D25780599

fbshipit-source-id: c67d3643ab28f0fcd440904baf54c67687781686
This commit is contained in:
John Knox
2021-01-05 09:22:28 -08:00
committed by Facebook GitHub Bot
parent 8a8b979f66
commit c460cb767f
9 changed files with 78 additions and 27 deletions

View File

@@ -6,6 +6,6 @@ sidebar_label: Stetho Guidance
In 2015, we introduced [Stetho](http://facebook.github.io/stetho/), an Android debugging bridge built on top of [Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools/). While it was a valuable tool to us and many members of the community, we felt that it limited us in what we could do with it. Stetho is Android-only and while Chrome DevTools gave us a nice foundation to build upon, they also limited us in what we could build. Stetho is an Android tool and Chrome DevTools is built for web developers. This means we can only provide a good experience for the intersection of those two development environments, which was very limiting. With Flipper being built as a standalone app, we can do more things, like handling adb connections and supporting iOS, which wasn't easily achievable with Stetho.
This is why we built Flipper. We wanted to create a platform that gives us all the flexibility we need to build more advanced features and support for iOS. One of Flipper's core concepts is its extensibility using [plugins](extending/index). Plugins are written in React and we provide a set of ready-to-use UI components that allow developers to build great plugin UIs with a few lines of code.
This is why we built Flipper. We wanted to create a platform that gives us all the flexibility we need to build more advanced features and support for iOS. One of Flipper's core concepts is its extensibility using [plugins](tutorial/intro.mdx). Plugins are written in React and we provide a set of ready-to-use UI components that allow developers to build great plugin UIs with a few lines of code.
While offering many new features, Flipper also already covers most of the features provided by Stetho. This includes network and layout inspection and an advanced log viewer. We are committed to continuously improving Flipper with new features and plugins, however, we are aware that not all Stetho features are currently supported by Flipper. If you are using a particular feature of Stetho which isn't supported by Flipper, we are more than happy to hear about your use-case. Stetho will continue to work and we are not abandoning it so you can choose the tool that fits your needs best. We are confident that Flipper will work well for most use-cases and are more than happy to accept contributions from the open-source community adding new features.