Skip to content

Commit 3b110f4

Browse files
authored
Fix code in example again.
1 parent 547d8d6 commit 3b110f4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

docs/FAQ.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,19 @@ export default class Wrapper extends Component {
9696
You can replace the `StyleGuide` component like this:
9797

9898
```javascript
99-
import React from 'react';
99+
import React, { Component } from 'react';
100100
import Layout from 'react-styleguidist/src/rsg-components/Layout';
101101
import Renderer from 'react-styleguidist/src/rsg-components/Layout/Renderer';
102102

103-
export default function StyleGuide(props) {
103+
export default class StyleGuide extends Component {
104+
componentDidMount() {
105+
/*_*/
106+
}
107+
104108
render() {
105109
const LayoutRenderer = Layout(Renderer);
106110
return (
107-
<div style={{border: '10px solid red'}}>
108-
<LayoutRenderer {...props} />
109-
</div>
111+
<LayoutRenderer {...this.props} />
110112
);
111113
}
112114
}

0 commit comments

Comments
 (0)