Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

CodePush should avoid set ref if stateless component wrapped #865

@farwayer

Description

@farwayer
function App() {
  return (
    ...
  )
}

App = codePush(App);
05-30 22:01:52.201  1486  1720 W ReactNativeJS: Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail.
05-30 22:01:52.201  1486  1720 W ReactNativeJS: 
05-30 22:01:52.201  1486  1720 W ReactNativeJS: Check the render method of `CodePushComponent`.
05-30 22:01:52.201  1486  1720 W ReactNativeJS:     in App (created by CodePushComponent)
05-30 22:01:52.201  1486  1720 W ReactNativeJS:     in CodePushComponent
05-30 22:01:52.201  1486  1720 W ReactNativeJS:     in RCTView (created by View)
05-30 22:01:52.201  1486  1720 W ReactNativeJS:     in View (created by AppContainer)
05-30 22:01:52.201  1486  1720 W ReactNativeJS:     in RCTView (created by View)
05-30 22:01:52.201  1486  1720 W ReactNativeJS:     in View (created by AppContainer)
05-30 22:01:52.201  1486  1720 W ReactNativeJS:     in AppContainer

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions