Skip to content

Instantly share code, notes, and snippets.

View avin-kavish's full-sized avatar
💡
Building

Avin avin-kavish

💡
Building
View GitHub Profile
@avin-kavish
avin-kavish / app.jsx
Created March 30, 2020 10:58
Overmind Basic Application
import React from "react"
import { createOvermind } from "overmind"
import { createHook, Provider } from "overmind-react"
const app = createOvermind({
state: {
counter: 0
},
actions: {
increment({ state }) {
const incrementCounter = () => {
type: 'INCREMENT',
}
const initialState = {
counter: 0
}
function reducer(state = initialState, action = {}) {
switch(action.type) {