View dapp.js
import React from 'react'
import withWeb3 from '../lib/withWeb3'
// Demonstration of a basic dapp with the withWeb3 higher-order component
class Dapp extends React.Component {
state = { balance: null }
storeValue = async () => {
const { accounts, contract } = this.props
const response = await contract.set(5, { from: accounts[0] })
View accounts.js
import React from 'react'
import withWeb3 from '../lib/withWeb3'
// Our `withWeb3` HOC actually injects web3, accounts, and contract into
// the props, but we are only using the accounts prop.
const Accounts = ({ accounts }) =>
<h1>My Accounts</h1>
<pre>{JSON.stringify(accounts, null, 4)}</pre>
View tierTransform.js
export default (show, venueType) => {
const tiers =, index) => ({
title: venueType[`tier${index + 1}Title`],
description: venueType[`tier${index + 1}Description`],
return {
View Softmax function
scores = [3.0, 1.0, 0.2]
import numpy as np
from math import e
def softmax(scores):
denominator = sum([e ** x for x in scores])
result = [e ** x / denominator for x in scores]

Thats So Fetch

A collection of asynchronous fetching examples with various frameworks and patterns.


Counter Examples

Moved to omg-counters

This is a collection of increment/decrement counters using various frontend frameworks.

The increment/decrement counter is the step between a hello world example and a todo app. Please note that the examples are supposed to be as minimal as possible.

So far we have the following: