Skip to content

Instantly share code, notes, and snippets.

View emilionavarro's full-sized avatar

Emilio Navarro emilionavarro

View GitHub Profile
@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}
@chaeplin
chaeplin / esp8266_fpm_mdem_sleep.ino
Created January 26, 2016 11:39
esp8266_fpm_mdem_sleep.ino
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include "/usr/local/src/ap_setting.h"
extern "C" {
#include "user_interface.h"
}
#define FPM_SLEEP_MAX_TIME 0xFFFFFFF