Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frint-store: interop with all reactive libraries #393

Merged
merged 2 commits into from
Dec 28, 2017
Merged

Conversation

fahad19
Copy link
Member

@fahad19 fahad19 commented Dec 26, 2017

Note: NOT a breaking change

What's done

frint-store now supports interoperability with other reactive libraries, following the TC39 proposal here: https://github.com/tc39/proposal-observable#observablefrom

Usage

As of latest release, we can get our state stream as an Observable like this:

const state$ = store.getState$();

With this PR, we now adhere to common standards as per the TC39 proposal, and can get the state stream by doing:

const state$ = Observable.from(store);

The store.getState$() still remains in the API, and uses from(store) internally.

Why

This will enable us to build more generic tools without having to know too much about the internal APIs of frint-store.

More will follow in #391

@fahad19 fahad19 self-assigned this Dec 26, 2017
@fahad19 fahad19 requested review from a team and reaktivo December 26, 2017 14:24
@codecov
Copy link

codecov bot commented Dec 26, 2017

Codecov Report

Merging #393 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #393      +/-   ##
==========================================
+ Coverage   97.33%   97.34%   +<.01%     
==========================================
  Files         101      101              
  Lines        3908     3918      +10     
==========================================
+ Hits         3804     3814      +10     
  Misses        104      104
Impacted Files Coverage Δ
packages/frint-store/src/Store.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a35c26f...0ea3013. Read the comment docs.

@fahad19 fahad19 merged commit f80fb56 into master Dec 28, 2017
@fahad19 fahad19 deleted the frint-store-interop branch December 28, 2017 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants