Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Agera | 7,340 | 4 years ago | 4 | apache-2.0 | Java | |||||
Reactive Programming for Android | ||||||||||
Learn Rxjs | 3,576 | 2 months ago | 13 | mit | TypeScript | |||||
Clear examples, explanations, and resources for RxJS | ||||||||||
Most | 3,453 | 1,070 | 297 | 7 months ago | 79 | October 08, 2020 | 48 | mit | JavaScript | |
Ultra-high performance reactive programming | ||||||||||
Kefir | 1,828 | 9,210 | 251 | 3 months ago | 86 | November 28, 2020 | 38 | mit | JavaScript | |
A Reactive Programming library for JavaScript | ||||||||||
Callbag Basics | 1,628 | 44 | 45 | a year ago | 10 | November 27, 2020 | 4 | mit | JavaScript | |
👜 Tiny and fast reactive/iterable programming library | ||||||||||
Flyd | 1,526 | 189 | 125 | a year ago | 34 | July 11, 2018 | 49 | mit | JavaScript | |
The minimalistic but powerful, modular, functional reactive programming library in JavaScript. | ||||||||||
Learnrx | 1,378 | 4 years ago | 40 | JavaScript | ||||||
A series of interactive exercises for learning Microsoft's Reactive Extensions Library for Javascript. | ||||||||||
Refract | 805 | 5 | a year ago | 32 | December 29, 2021 | 4 | mit | TypeScript | ||
Harness the power of reactive programming to supercharge your components | ||||||||||
Qbit | 687 | 8 | 16 | 5 years ago | 83 | October 20, 2017 | 62 | apache-2.0 | Java | |
The Java microservice lib. QBit is a reactive programming lib for building microservices - JSON, HTTP, WebSocket, and REST. QBit uses reactive programming to build elastic REST, and WebSockets based cloud friendly, web services. SOA evolved for mobile and cloud. ServiceDiscovery, Health, reactive StatService, events, Java idiomatic reactive programming for Microservices. | ||||||||||
Smallrye Mutiny | 661 | 13 | 10 days ago | 49 | June 20, 2022 | 12 | apache-2.0 | Java | ||
An Intuitive Event-Driven Reactive Programming Library for Java |
import 'package:flutter_github_search_rx_redux/domain/search_usecase.dart';
import 'package:rx_redux/rx_redux.dart';
import 'package:rxdart_ext/rxdart_ext.dart';
import 'home_action.dart';
import 'home_state.dart';
RxReduxStore<HomeAction, HomeState> createStore(SearchUseCase searchUseCase) =>
RxReduxStore(
initialState: HomeState.initial(),
sideEffects: HomeSideEffects(searchUseCase)(),
reducer: (state, action) => action.reduce(state),
logger: rxReduxDefaultLogger,
);
class HomeSideEffects {
final SearchUseCase _searchUseCase;
HomeSideEffects(this._searchUseCase);
List<SideEffect<HomeAction, HomeState>> call() => [
searchActionToTextChangedAction,
search,
nextPage,
retry,
];
Stream<HomeAction> searchActionToTextChangedAction(
Stream<HomeAction> actions,
GetState<HomeState> getState,
) =>
actions
.whereType<SearchAction>()
.debounceTime(const Duration(milliseconds: 500))
.map((action) => action.term.trim())
.where((term) => term.isNotEmpty)
.distinct()
.map((term) => TextChangedAction((b) => b..term = term));
Stream<HomeAction> search(
Stream<HomeAction> actions,
GetState<HomeState> getState,
) =>
actions
.whereType<TextChangedAction>()
.map((action) => action.term)
.switchMap((term) => _nextPage(term, 1));
Stream<HomeAction> nextPage(
Stream<HomeAction> actions,
GetState<HomeState> getState,
) {
final textChangedAction$ = actions.whereType<TextChangedAction>().debug();
final performLoadingNextPage = (LoadNextPageAction action) {
return Stream.value(getState())
.where((state) => state.canLoadNextPage)
.exhaustMap((state) => _nextPage(state.term, state.page + 1)
.takeUntil(textChangedAction$)
.debug());
};
return actions
.whereType<LoadNextPageAction>()
.exhaustMap(performLoadingNextPage);
}
Stream<HomeAction> retry(
Stream<HomeAction> actions,
GetState<HomeState> getState,
) {
final textChangedAction$ = actions.whereType<TextChangedAction>().debug();
final performRetry = (RetryAction action) {
return Stream.value(getState())
.where((state) => state.canRetry)
.exhaustMap((state) => _nextPage(state.term, state.page + 1)
.takeUntil(textChangedAction$)
.debug());
};
return actions.whereType<RetryAction>().exhaustMap(performRetry);
}
Stream<HomeAction> _nextPage(String term, int nextPage) {
final loadingAction = SearchLoadingAction((b) => b
..term = term
..nextPage = nextPage);
return Rx.fromCallable(() => _searchUseCase(term: term, page: nextPage))
.map<HomeAction>(
(items) => SearchSuccessAction((b) => b
..term = term
..items.replace(items)),
)
.startWith(loadingAction)
.onErrorReturnWith(
(e, s) => SearchFailureAction((b) => b
..error = e
..term = term),
);
}
}