aboutsummaryrefslogtreecommitdiff
path: root/lib/components.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-11-13 08:16:12 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-11-13 08:16:52 +0100
commitb2128609ac8159a14224deba399144b3400c8c20 (patch)
tree4759dfda67c54f6838c3aef0951545ae18bb83bd /lib/components.ts
parent3f0ee289c4a61991d0e75906a9bd949cebb39d20 (diff)
Finally give in and use React, minor tweeks.
Preact (a minimalistic React alternative) had too many bugs ...
Diffstat (limited to 'lib/components.ts')
-rw-r--r--lib/components.ts5
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
+}