Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Famous Ketoma jfamousket

🎯
Focusing
  • Silverslope
  • Germany
Block or report user

Report or block jfamousket

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
@jfamousket
jfamousket / Typed useReducer
Last active Nov 6, 2019
A strongly typed useReducer hook allowing you to use setState as used in react classed based components
View Typed useReducer
/**
* Mimic set state function of react
* @param prevState
* @param property
*/
type TypedReducer<T> = (
prevState: T,
property: { [K in keyof T]?: T[K] }
) => T;
You can’t perform that action at this time.