Skip to content

Instantly share code, notes, and snippets.

Yoav Ganbar hamatoyogi

Block or report user

Report or block hamatoyogi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View SC-bsgen.js
export default class extends React.Component {
constructor() { ... } // for brevity
// define the data we want to "watch"
@observable chosenPhrase = this.randomPhrases[0];
@observable counter = 0;
// define an "action" -> we are saying what that we want to change a peice of "watched" data
View styled-components-demo.js
import styled from 'styled-components';
// some overly styled button
const MyButton = styled.button`
   background: #3d94f6;
   background-image: linear-gradient(to bottom, #3d94f6, #1e62d0);
   border-radius: 20px;
   color: #ffffff;
   font-family: Open Sans;
View mobx-simple-example.js
import React from 'react';
import { observable, action } from 'mobx';
import { observer } from 'mobx-react';
export default class extends React.Component {
constructor() {
this.randomPhrases = [
View next-js-simple-article.js
export default class Article extends Component {
// notice that it's an async function
static async getInitialProps () {
// fetch data on the server and parse it to JSON
const res = await
const json = await res.json();
View yuval-js-2.js
const arbitraryDataList = [{
rootId: 'false'
root: {
field1: 'val1'
root: {
You can’t perform that action at this time.