Skip to content

Commit 80623ad

Browse files
Remove more references to expose-loader in documentation
1 parent 3556f19 commit 80623ad

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

site/jekyll/features/css-in-js.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ If you're using more than one CSS-in-JS library in your project, we've got you c
1313

1414
### [Styled Components](https://github.com/styled-components/styled-components)
1515

16-
Expose styled-components as `global.Styled`:
16+
Expose styled-components in your server bundle:
1717

1818
```js
19-
require('expose-loader?Styled!styled-components');
19+
import { ServerStyleSheet } from 'styled-components';
20+
global.Styled = { ServerStyleSheet };
2021
```
2122

2223
Add the render helper to the call to `Html.React`:
@@ -90,10 +91,11 @@ export function StyledComponentsDemo() {
9091

9192
### [React-JSS](https://github.com/cssinjs/react-jss)
9293

93-
Expose react-jss as `global.ReactJss`:
94+
Expose react-jss in your server bundle:
9495

9596
```js
96-
require('expose-loader?ReactJss!react-jss');
97+
import { JssProvider, SheetsRegistry } from 'react-jss';
98+
global.ReactJss = { JssProvider, SheetsRegistry };
9799
```
98100

99101
Add the render helper to the call to `Html.React`:
@@ -179,10 +181,11 @@ export class ReactJssDemo extends React.Component {
179181

180182
Emotion's integration with ReactJS.NET only supports rendering inline styles (instead of rendering them in the document head).
181183

182-
Expose emotion as `global.EmotionServer`:
184+
Expose emotion in your server bundle:
183185

184186
```js
185-
require('expose-loader?EmotionServer!emotion-server');
187+
import { renderStylesToString } from 'emotion-server';
188+
global.EmotionServer = { renderStylesToString };
186189
```
187190

188191
Add the render helper to the call to `Html.React`:

site/jekyll/features/react-helmet.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ React Helmet is a library that allows setting elements inside the `<head>` tag f
99

1010
Make sure ReactJS.NET is up to date. You will need at least ReactJS.NET 4.0 (which is in public beta at the time of writing).
1111

12-
Expose React Helmet as `global.Helmet`:
12+
Expose React Helmet in your server bundle:
1313

1414
```js
15-
require('expose-loader?Helmet!react-helmet');
15+
import Helmet from 'react-helmet';
16+
global.Helmet = Helmet;
1617
```
1718

1819
Add the render helper to the call to `Html.React`:

0 commit comments

Comments
 (0)