-
Notifications
You must be signed in to change notification settings - Fork 136
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
Add useService hook and modern Context #242
Conversation
Codecov Report
@@ Coverage Diff @@
## master #242 +/- ##
========================================
+ Coverage 74.8% 77% +2.19%
========================================
Files 13 14 +1
Lines 262 287 +25
Branches 55 58 +3
========================================
+ Hits 196 221 +25
Misses 49 49
Partials 17 17
Continue to review full report at Codecov.
|
Only thing missing is an update to the |
Right now there is no difference between a token that hasn't been registered, a plugin that has no |
Cool, changes look great! |
export const FusionContext = React.createContext<any>({}); | ||
export const ServiceContext = React.createContext<any>(() => {}); | ||
|
||
type ReturnsType<T> = () => T; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed a mechanism to support Token.optional
since flow considers it different from Token
. This technically allows someone to pass in something that isn't a token. The usage of this function is so straightforward that I don't think this is a huge issue.
!merge |
Triggered Fusion.js build verification: https://buildkite.com/uberopensource/fusion-release-verification/builds/1943 |
RFC