-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.js
More file actions
16 lines (15 loc) · 717 Bytes
/
demo.js
File metadata and controls
16 lines (15 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class Foo extends React.Component {
constructor(props) {
super(props);
this.name = 'foo bar bazzzzzzzzzzzzzzzzzzzz';
// look, a window
window.localStorage.setItem('yee', 'boiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii');
}
render() {
const el = React.createElement('p', { key: this.name }, this.name);
// localStorage???!?!?!?!?!?!
const el2 = React.createElement('p', { key: 'yee' }, localStorage.getItem('yee'));
return React.createElement('div', null, [el, el2]);
}
}
ReactDOMServer.renderToStaticMarkup(React.createElement(Foo));