Skip to content

Instantly share code, notes, and snippets.

@asiniy
Created July 4, 2018 06:52
Show Gist options
  • Save asiniy/9bb0a8a0d3a896285f70dbc15a6f217a to your computer and use it in GitHub Desktop.
Save asiniy/9bb0a8a0d3a896285f70dbc15a6f217a to your computer and use it in GitHub Desktop.
Initial code - Extending JavaScript with ease (beginner level tutorial)
import React from 'react'
INNER_CIRCLE_TARGETS_COUNT = 10
class MyComponent extends React.Component {
render() {
// A big function with a complex logic
const { collectorGroup } = this.props
const collectorGroupHasFewCircles = (collectorGroup.targets_count > INNER_CIRCLE_TARGETS_COUNT)
// return big render here
}
}
export default MyComponent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment