react.dev
react.dev copied to clipboard
[Beta] Migrating Error Decoder
beta.reactjs.org
currently missing /error-decoder
(E.g. https://reactjs.org/docs/error-decoder.html/?invariant=421). https://beta.reactjs.org/docs/error-decoder.html/?invariant=421 will be redirected to ~~https://legacy.reactjs.org/error-decoder.html?invariant=421 which becomes 404.~~ https://legacy.reactjs.org/docs/error-decoder.html?invariant=421
Why does /docs/something
redirect to /something
? I can't find this redirect.
Wait, https://beta.reactjs.org/docs/error-decoder.html/?invariant=421 redirects to https://legacy.reactjs.org/docs/error-decoder.html/?invariant=421 for me, which is correct.
Wait, https://beta.reactjs.org/docs/error-decoder.html/?invariant=421 redirects to https://legacy.reactjs.org/docs/error-decoder.html/?invariant=421 for me, which is correct.
It is working for me now, too. I don't know what happened on my side before, most likely I mistyped something in my browser's address bar.
But the issue is about migrating the existing Error Decoder to Beta Docs.
The current error decoder page has the following parts:
- The markdown page: https://github.com/reactjs/reactjs.org/blob/d696cb1d2a1ea1d7eb92d5b098b51dde8fcc536c/content/docs/error-decoder.md?plain=1#L1-L5
- The template of the page: https://github.com/reactjs/reactjs.org/blob/d696cb1d2a1ea1d7eb92d5b098b51dde8fcc536c/src/pages/docs/error-decoder.html.js#L1-L10
- A Gatsby plugin used to query error code json: https://github.com/reactjs/reactjs.org/blob/d696cb1d2a1ea1d7eb92d5b098b51dde8fcc536c/plugins/gatsby-source-react-error-codes/gatsby-node.js#L13-L30
Yeah, porting the error decoder to the new site would be dope.
Yeah, porting the error decoder to the new site would be dope.
@rickhanlonii I have just created an initial prototype in #6214.