Skip to content

Instantly share code, notes, and snippets.

View berzniz's full-sized avatar

Tal Bereznitskey berzniz

View GitHub Profile
// component A
const a = () => (
<Overdrive id="bender-to-fry">
<img src="bender.img"/>
</Overdrive>
);
// component B
const b = () => (
<Overdrive id="bender-to-fry">
@berzniz
berzniz / react.jsx
Last active March 28, 2018 20:09
Example for "Update on Async Rendering"
class Example extends React.Component {
componentDidMount () {
this.fetchData(this.props)
}
componentWillReceiveProps (props) {
if (props.id !== this.props.id) {
this.fetchData(props)
}
}
@berzniz
berzniz / config.yml
Created June 6, 2018 07:55
Starter CircleCI v2 configuration for Node.js apps
version: 2.0
jobs:
test:
docker:
- image: circleci/node:8.10
working_directory: ~/circleci-build
environment:
EXAMPLE_ENV_FOR_TESTING: "test"
steps: