Skip to content
Advertisement

react context provider return undefine as component

this the first time to me with context in Reactjs and have this problem Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it’s defined in, or you might have mixed up default and named imports. Check the render method of App `

FeedbackContext.js

JavaScript

App.js

JavaScript

ShowButton.js

JavaScript

Advertisement

Answer

It’s consumer should be capital.

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement