-
Notifications
You must be signed in to change notification settings - Fork 801
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
feat: React16.6 compatibility #1084
Conversation
@@ -16,7 +16,15 @@ import logger from './logger' | |||
|
|||
import { preactAdapter } from './adapters/preact' | |||
|
|||
function resolveType(type) { | |||
const forceSimpleSFC = { proxy: { allowSFC: false } } |
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.
React.memo could "eat" only simple class or functional component.
The current approach, with "indeterminate" components is breaking the stuff.
registerComponent(type) | ||
} | ||
if (isMemoType({ type })) { |
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.
Probably the same magic is needed for Context
Codecov Report
@@ Coverage Diff @@
## master #1084 +/- ##
==========================================
- Coverage 87.09% 86.35% -0.74%
==========================================
Files 32 32
Lines 891 938 +47
Branches 213 229 +16
==========================================
+ Hits 776 810 +34
- Misses 95 107 +12
- Partials 20 21 +1
Continue to review full report at Codecov.
|
String(type).indexOf('useEffect') > 0) && | ||
cold(type), | ||
}) | ||
``` |
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.
This code snippet and the one above are identical. Is this expected or that was supposed to be something else?
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.
💩 this is something unfinished. Idea was to provide yet-another-api, to specify special flags, component should be created with.
The current approach to "fix" hooks with setConfig({pureSFC: true})
is breaking Relay-modern.
I also could not put this logic inside, as long I could not cast every component to a string - emotion
throws an Error and should be fixed first.
fixing
invisible
to RHL