diff options
Diffstat (limited to 'lib/components.ts')
-rw-r--r-- | lib/components.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/components.ts b/lib/components.ts index fb802ab47..066e6d07f 100644 --- a/lib/components.ts +++ b/lib/components.ts @@ -30,16 +30,15 @@ export interface StateHolder<T> { * Component that doesn't hold its state in one object, * but has multiple state holders. */ -export abstract class ImplicitStateComponent<PropType> extends preact.Component<PropType, any> { +export abstract class ImplicitStateComponent<PropType> extends React.Component<PropType, any> { makeState<StateType>(initial: StateType): StateHolder<StateType> { let state: StateType = initial; return (s?: StateType): StateType => { if (s !== undefined) { state = s; - // In preact, this will always schedule a (debounced) redraw this.setState({} as any); } return state; }; } -}
\ No newline at end of file +} |