1
1
import * as React from 'react'
2
- import { structEq } from './../utils'
3
- import { Atom } from './../atom'
4
- import { warning , getReactComponentName , DEV_ENV } from './../utils'
5
2
import {
6
- Observable ,
7
- ObservableInput ,
8
- Subscription as RxSubscription ,
9
- combineLatest ,
10
- of
3
+ combineLatest , Observable ,
4
+ ObservableInput , of , Subscription as RxSubscription
11
5
} from 'rxjs'
12
- import { scan , map } from 'rxjs/operators'
6
+ import { map , scan } from 'rxjs/operators'
7
+ import { Atom } from './../atom'
8
+ import { DEV_ENV , getReactComponentName , structEq , warning } from './../utils'
13
9
14
10
export interface Subscription {
15
11
unsubscribe ( ) : void
@@ -21,7 +17,7 @@ export type Lifted<T> = {
21
17
22
18
export interface LiftWrapperProps < TProps > {
23
19
component : React . Component < TProps , any >
24
- | React . StatelessComponent < TProps >
20
+ | React . FunctionComponent < TProps >
25
21
| React . ComponentClass < TProps >
26
22
| React . ComponentType
27
23
| keyof React . ReactHTML
@@ -151,7 +147,7 @@ export type LiftedComponentProps<TProps> = Lifted<TProps> & {
151
147
* <LiftedHelloComponent name={observableValue as any} />
152
148
*/
153
149
export function lift < TProps > (
154
- component : React . ComponentClass < TProps > | React . StatelessComponent < TProps >
150
+ component : React . ComponentClass < TProps > | React . FunctionComponent < TProps >
155
151
) {
156
152
return ( props : LiftedComponentProps < TProps > ) =>
157
153
React . createElement < LiftWrapperProps < TProps > > (
@@ -216,7 +212,7 @@ function walkObservables<T>(
216
212
*/
217
213
function render < P > (
218
214
class_ : React . Component < P , any >
219
- | React . StatelessComponent < P >
215
+ | React . FunctionComponent < P >
220
216
| React . ComponentClass < P >
221
217
| React . ComponentType
222
218
| keyof React . ReactHTML ,
0 commit comments