Skip to content

Instantly share code, notes, and snippets.

@indiesquidge
indiesquidge / objects-over-classes.md
Last active January 17, 2024 09:30
We are better off avoiding ES6 classes in JavaScript when possible

Plain JavaScript objects are better than classes when they can be used, and many popular modern frameworks have adopted their use.

Consider that in React a component can be created as either a class or as an object.

// using a class
class Welcome extends React.Component {
  render() {
 Hello, {this.props.name}
@euoia
euoia / gist:53859b9d664c282978c9
Created November 13, 2015 11:24
Basic ES6 .eslintrc for Node.js
{
"rules": {
"no-console": 0,
"indent": 2,
"quotes": [
2,
"single"
],
"linebreak-style": [
2,