This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const algoliasearch = require('algoliasearch') | |
const express = require('express') | |
const bodyParser = require('body-parser') | |
const app = express() | |
const client = algoliasearch('H1LZZCXWZT', process.env.API_KEY) | |
const index = client.initIndex('movies') | |
app.get('/', (req, res) => res.send('GET')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RefExample extends React.Component { | |
constructor (props) { | |
super(props) | |
this.handleClick = this.handleClick.bind(this) | |
} | |
handleClick () { | |
this.textInput.focus() | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class List extends React.Component { | |
render() { | |
return ( | |
<ul> | |
<ListItem /> | |
</ul> | |
); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul> | |
<div> | |
<li>Hello</li> | |
<li>World</li> | |
</div> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class List extends React.Component { | |
render() { | |
return ( | |
<ul> | |
<ListItem /> | |
</ul> | |
); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul> | |
<li>Hello</li> | |
<li>World</li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function App() { | |
// Use "My Web App" if no child overrides this | |
return ( | |
<DocumentTitle title='My Web App'> | |
<SomeRouter /> | |
</DocumentTitle> | |
); | |
} | |
function HomePage() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id='container'> | |
<div id='baby'> | |
Hello | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let node = { | |
tag: 'div' | |
attributes: { id: 'container' } | |
children: [ | |
// where the contained div would go | |
] | |
}; |
OlderNewer