Skip to content

Instantly share code, notes, and snippets.

View sava-vidakovic's full-sized avatar

Sava Vidakovic sava-vidakovic

  • Belgrade
View GitHub Profile
@schettino
schettino / useUserReducer.ts
Created March 30, 2019 20:23
Better Reducers with React and Typescript 3.4
import { useReducer } from 'react'
export function updateName(name: string) {
return <const>{
type: 'UPDATE_NAME',
name
}
}
export function addPoints(points: number) {