mirror of
https://github.com/re-rxjs/react-rxjs.git
synced 2025-12-08 18:01:51 +00:00
Remove circular dependencies
This commit is contained in:
parent
d2e7702796
commit
c929c7e210
1
src/SUSPENSE.ts
Normal file
1
src/SUSPENSE.ts
Normal file
@ -0,0 +1 @@
|
||||
export const SUSPENSE = Symbol("SUSPENSE")
|
||||
@ -1,10 +1,10 @@
|
||||
import { Observable, NEVER, concat } from "rxjs"
|
||||
import { BehaviorObservable } from "./BehaviorObservable"
|
||||
import { distinctShareReplay } from "./operators/distinct-share-replay"
|
||||
import { ConnectorOptions, defaultConnectorOptions } from "./options"
|
||||
import { SUSPENSE } from "./"
|
||||
import { useObservable } from "./useObservable"
|
||||
import reactEnhancer from "./operators/react-enhancer"
|
||||
import { ConnectorOptions, defaultConnectorOptions } from "./options"
|
||||
import { BehaviorObservable } from "./BehaviorObservable"
|
||||
import { SUSPENSE } from "./SUSPENSE"
|
||||
import { useObservable } from "./useObservable"
|
||||
|
||||
export function connectFactoryObservable<
|
||||
A extends (number | string | boolean | null)[],
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { Observable, NEVER, concat } from "rxjs"
|
||||
import { distinctShareReplay } from "./"
|
||||
import { distinctShareReplay } from "./operators/distinct-share-replay"
|
||||
import reactEnhancer from "./operators/react-enhancer"
|
||||
import { useObservable } from "./useObservable"
|
||||
import { ConnectorOptions, defaultConnectorOptions } from "./options"
|
||||
import reactEnhancer from "./operators/react-enhancer"
|
||||
|
||||
export function connectObservable<T>(
|
||||
observable: Observable<T>,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
export const SUSPENSE = Symbol("SUSPENSE")
|
||||
export { SUSPENSE } from "./SUSPENSE"
|
||||
export { BehaviorObservable } from "./BehaviorObservable"
|
||||
export { connectObservable } from "./connectObservable"
|
||||
export { connectFactoryObservable } from "./connectFactoryObservable"
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { Observable, Subscription, Subject } from "rxjs"
|
||||
import { SUSPENSE, BehaviorObservable } from "../"
|
||||
import { SUSPENSE } from "../SUSPENSE"
|
||||
import { BehaviorObservable } from "../BehaviorObservable"
|
||||
|
||||
function defaultTeardown() {}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Observable, of, Subscription, Subject, race } from "rxjs"
|
||||
import { delay, takeUntil, take, filter, tap } from "rxjs/operators"
|
||||
import { BehaviorObservable, SUSPENSE } from "../"
|
||||
import { BehaviorObservable } from "../BehaviorObservable"
|
||||
import { SUSPENSE } from "../SUSPENSE"
|
||||
|
||||
const IS_SSR =
|
||||
typeof window === "undefined" ||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { ObservableInput, from } from "rxjs"
|
||||
import { startWith } from "rxjs/operators"
|
||||
import { SUSPENSE } from "../"
|
||||
import { SUSPENSE } from "../SUSPENSE"
|
||||
|
||||
export const suspend = <T>(source$: ObservableInput<T>) =>
|
||||
from(source$).pipe(startWith(SUSPENSE))
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { useEffect, useReducer } from "react"
|
||||
import { BehaviorObservable, SUSPENSE } from "./"
|
||||
import { SUSPENSE } from "./SUSPENSE"
|
||||
import { BehaviorObservable } from "./BehaviorObservable"
|
||||
|
||||
const reducer = (
|
||||
_: any,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user