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

TypeError: undefined is not a function (evaluating 'instance.render()') #20946

Closed
Quichei opened this issue Sep 2, 2018 · 4 comments
Closed
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@Quichei
Copy link

Quichei commented Sep 2, 2018

I needed borderStyle: 'dashed' to work on android so I upgraded to

react-native-cli: 2.0.1
react-native: 0.57.0-rc.3

everything worked fine but when I navigated to the screen (tabNavigator) I got this error (every other screen worked fine)
I changed the screen name to something else and now im getting this error on launch


TypeError: undefined is not a function (evaluating 'instance.render()')

This error is located at:
    in App (at renderApplication.js:34)
    in RCTView (at View.js:44)
    in RCTView (at View.js:44)
    in AppContainer (at renderApplication.js:33)
finishClassComponent
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:10428:21
updateClassComponent
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:10371:4
beginWork
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:11152:8
performUnitOfWork
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:13671:21
workLoop
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:13710:41
renderRoot
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:13762:15
performWorkOnRoot
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14676:17
performWork
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14575:24
performSyncWork
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14528:14
requestWork
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14427:19
scheduleWork
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14201:16
scheduleRootUpdate
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14949:15
updateContainerAtExpirationTime
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14982:28
updateContainer
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:15014:4
render
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:15687:20
renderApplication
    MYPROJECT\node_modules\react-native\Libraries\ReactNative\renderApplication.js:59:34
run
    MYPROJECT\node_modules\react-native\Libraries\ReactNative\AppRegistry.js:101:10
runApplication
    MYPROJECT\node_modules\react-native\Libraries\ReactNative\AppRegistry.js:195:26
__callFunction
    MYPROJECT\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:349:47
<unknown>
    MYPROJECT\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:106:26
__guard
    MYPROJECT\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:297:10
callFunctionReturnFlushedQueue
    MYPROJECT\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:105:17

render is undefined??what is happening?

@react-native-bot
Copy link
Collaborator

We are automatically closing this issue because it does not appear to follow any of the provided issue templates.

Please make use of the bug report template to let us know about a reproducible bug or regression in the core React Native library.

If you'd like to propose a change or discuss a feature request, there is a repository dedicated to Discussions and Proposals you may use for this purpose.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. 📋No Template labels Sep 2, 2018
@jerinho
Copy link

jerinho commented Nov 22, 2018

I needed borderStyle: 'dashed' to work on android so I upgraded to

react-native-cli: 2.0.1
react-native: 0.57.0-rc.3

everything worked fine but when I navigated to the screen (tabNavigator) I got this error (every other screen worked fine)
I changed the screen name to something else and now im getting this error on launch


TypeError: undefined is not a function (evaluating 'instance.render()')

This error is located at:
    in App (at renderApplication.js:34)
    in RCTView (at View.js:44)
    in RCTView (at View.js:44)
    in AppContainer (at renderApplication.js:33)
finishClassComponent
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:10428:21
updateClassComponent
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:10371:4
beginWork
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:11152:8
performUnitOfWork
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:13671:21
workLoop
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:13710:41
renderRoot
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:13762:15
performWorkOnRoot
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14676:17
performWork
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14575:24
performSyncWork
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14528:14
requestWork
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14427:19
scheduleWork
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14201:16
scheduleRootUpdate
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14949:15
updateContainerAtExpirationTime
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:14982:28
updateContainer
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:15014:4
render
    MYPROJECT\node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:15687:20
renderApplication
    MYPROJECT\node_modules\react-native\Libraries\ReactNative\renderApplication.js:59:34
run
    MYPROJECT\node_modules\react-native\Libraries\ReactNative\AppRegistry.js:101:10
runApplication
    MYPROJECT\node_modules\react-native\Libraries\ReactNative\AppRegistry.js:195:26
__callFunction
    MYPROJECT\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:349:47
<unknown>
    MYPROJECT\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:106:26
__guard
    MYPROJECT\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:297:10
callFunctionReturnFlushedQueue
    MYPROJECT\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:105:17

render is undefined??what is happening?

dude please just give what the bot want or provide your solution if any

@huytran123
Copy link

Use this version to resolve this error :). I have tested it, and worked fine:
"react": "16.6.3",
"react-native": "0.58.0-rc.2"

@cassmtnr
Copy link

Using render as:
render = () => {

solved for me, but is it necessary? Even if I just return:

render() {
	return <View />
}

it returns me this error...

@facebook facebook locked as resolved and limited conversation to collaborators Sep 2, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Sep 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants