Skip to content

Commit f8b562e

Browse files
committed
disabling static page generation
1 parent 219b224 commit f8b562e

File tree

5 files changed

+37
-597
lines changed

5 files changed

+37
-597
lines changed

reactjsfoundations.com/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"start": "react-scripts start",
3131
"prebuild": "npm run sitemap",
3232
"build": "react-scripts build",
33-
"postbuild": "react-snap",
3433
"test": "react-scripts test",
3534
"eject": "react-scripts eject",
3635
"sitemap": "babel-node ./sitemap-gen.js"
@@ -67,7 +66,6 @@
6766
"fs": "^0.0.1-security",
6867
"path": "^0.12.7",
6968
"prettier": "^2.6.2",
70-
"react-app-rewired": "^2.2.1",
71-
"react-snap": "^1.23.0"
69+
"react-app-rewired": "^2.2.1"
7270
}
7371
}

reactjsfoundations.com/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
href="%PUBLIC_URL%/favicon-16x16.png"
2121
/>
2222
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
23-
<link rel="preload" as="image" href="/images/cover.webp" />
23+
2424
<meta name="viewport" content="width=device-width, initial-scale=1" />
2525
<meta name="theme-color" content="#000000" />
2626
<script

reactjsfoundations.com/src/Introduction.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ function Introduction(props) {
4848
everything you need to understand what React is and how to start
4949
building applications with it."
5050
/>
51+
<link rel="preload" as="image" href="/images/cover.webp" />
5152
</Helmet>
5253
<p
5354
style={{

reactjsfoundations.com/src/index.js

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11
import React from 'react';
2-
import { createRoot, hydrateRoot } from 'react-dom/client';
2+
import ReactDOM from 'react-dom/client';
33
import { BrowserRouter as Router } from 'react-router-dom';
44
import App from './App';
55
import ScrollToTop from './ScrollToTop';
66

7-
const container = document.getElementById('root');
8-
9-
if (container.hasChildNodes()) {
10-
hydrateRoot(
11-
container,
12-
<Router>
13-
<ScrollToTop>
14-
<App />
15-
</ScrollToTop>
16-
</Router>
17-
);
18-
} else {
19-
createRoot(container).render(
20-
<Router>
21-
<ScrollToTop>
22-
<App />
23-
</ScrollToTop>
24-
</Router>
25-
);
26-
}
7+
ReactDOM.createRoot(document.getElementById('root')).render(
8+
<Router>
9+
<ScrollToTop>
10+
<App />
11+
</ScrollToTop>
12+
</Router>
13+
);

0 commit comments

Comments
 (0)