component in separate files #2
Replies: 3 comments 5 replies
-
found option with class component by means of ` class Footer extends Component { © 2022 . All rights reserved. ); } } export default Footer; ` |
Beta Was this translation helpful? Give feedback.
-
The template uses React v17, which requires |
Beta Was this translation helpful? Give feedback.
-
I updated the react template to use v18 of React. Should work without importing React. It's kinda slow when developing, but I'll look at some HMR solutions later in the week. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hi ,
Not sure if i am doing some silly mistake but not able to move jsx functions to their own files and make them work.
Eg.
If i have 3 functions say header, content and footer. If all 3 are in on-init.tsx then it works fine
Now, if i move any 1 or more of these functions to a separate file -say Footer.tsx and do
import Footer from "./Footer"; in on-init.tsx then getting a error
what could be the issue ? If i return plain js data types it works fine.
Beta Was this translation helpful? Give feedback.
All reactions