v0.5.0 Beta: Server Side Rendering and Schema Components #88
rohit-gohri
announced in
Announcements
Replies: 2 comments 16 replies
-
|
You will have to use the custom ServerStyle component in your Theme Root (as mentioned in facebook/docusaurus#3236 (comment)) for SSR like below: import React from 'react';
import ServerStyle from '@theme/ServerStyle';
function Root({ children }: { children: React.Component }): JSX.Element {
return (
<>
// TODO: Remove when docusaurus adds proper css-in-js support (https://github.com/rohit-gohri/redocusaurus/issues/90)
<ServerStyle from={children} />
{children}
</>
);
}
export default Root;See https://github.com/rohit-gohri/redocusaurus/blob/7bf52e9be23da74c1bde920377a081f5efac14a2/website/src/theme/Root/index.tsx for example project. |
Beta Was this translation helpful? Give feedback.
5 replies
-
|
Hello, @rohit-gohri. Congratulations for this awesome project. Is there a configuration to disable SSR? I would like to the browser loads the component when a user access the page. |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Minor Changes
0fbefefThanks @rohit-gohri! - Allow importing single model defenition inside mdx files - Import single model defenition inside mdx files. #4612d7a26Thanks @rohit-gohri! - Add support for SSR - Support proper Server Side Rendering #42Patch Changes
e0856fa#86 Thanks @rohit-gohri! - Fix common types not being exportedThis discussion was created from the release v0.5.0 Beta: Server Side Rendering and Schema Components.
Beta Was this translation helpful? Give feedback.
All reactions