You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Step 4b: use react-transmit to declaratively define data deps
There are multiple ways to solve async rendering issue. Here we'll
use react-transmit to declaratively define our data dependencies per component,
and return rendered html only when all data is resolved.
It works even with nested components, constructing the single promises tree,
which is qute cool. It is inspired by Facebook Relay, so if you are familiar
with it, you'll feel right at home.
Now lets learn to deal with styles. We configure webpack loaders to
31
31
support loading CSS files. This is cool, but there comes one problem
@@ -36,7 +36,7 @@ Let's fix this problem with webpack's ExtractTextPlugin plugin: it
36
36
extracts all CSS styles into one CSS file that we can serve to our client,
37
37
so our page will instantly look perfectly styled, even without JS.
38
38
39
-
### Step 3a: switch to CSS modules
39
+
### [Step 3a: switch to CSS modules](https://github.com/dimaip/server-side-rendering/commit/e2c02444b1e7c6ec349511aa9b2da1a52aba5474)
40
40
41
41
Everybody loves CSS modules, and the great news is that they come free with Webpack.
42
42
The bad news is that we can't use them with server-side rendering, as we don't use
@@ -46,7 +46,7 @@ So at this step we broke everything, and the only way to continue from here, is
46
46
start using Webpack to pre-build code for server-side rendering too, and that's
47
47
what we'll do at the next step.
48
48
49
-
### Step 3b: save the day by making webpack to render server-side code
49
+
### [Step 3b: save the day by making webpack to render server-side code](https://github.com/dimaip/server-side-rendering/commit/6e36b9690816d414ca36775c6487e0b6dbd8abe3)
50
50
51
51
To save our issue with CSS modules, we make Webpack to render both
52
52
our client and our server side code. The best way to do it is to
@@ -64,7 +64,7 @@ Great! Now our build is fixed, so we can use CSS modules both during client
0 commit comments