-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Decorating memoized component #2037
Comments
I can also send a PR in case if this is ok solution. If for some reason you don't want people to decorate memoized components it's also possible to throw some more descriptive error |
@Kerizer I have the same issue when using mobX observer wrapper on the root component, did you fix this issue? |
This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment. |
Not resolved yet |
Two workarounds: 1. Don't use
|
Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):
Steps to Reproduce
memo
function (imported fromreact
or other library)Expected Behavior
Codepush is working
Actual Behavior
When checking if
render
method exists there is no check ifRootComponent.prototype
exists - and it does not exists ifRootComponent
is wrapped intomemo
- https://github.com/microsoft/react-native-code-push/blob/master/CodePush.js#L581Simplest solution would be to change
if (RootComponent.prototype.render) {
withif (RootComponent.prototype && RootComponent.prototype.render) {
(let's say somebody really needs to usememo
on the codepushuble component for whatever reason)Environment
(The more info the faster we will be able to address it!)
The text was updated successfully, but these errors were encountered: