Hi I’m trying to implement 2 cells whose only difference is the QUERY.
If I copy a paste the Success
component code from the original cell to the modified cell, the modified cell works as expected. However if for reusability, I import and re-export the component instead, i.e. export {Success} from '../OriginalCell'
, I get the following error in the browser
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 `ModifiedCell`
I’m a bit stumped here as I thought importing and re-exporting a named component should have the same effect as copy-pasting that component. Would appreciate some insight into what’s going on here.
P.S. For the original purpose of reusability, I’ve found a workaround by defining QUERY as a function. Just want to understand what’s going on here for future reference. Thank you for your help.