Components and Pages
Answered
Golden paper wasp posted this in #help-forum
Golden paper waspOP
is this a good practice?
const Home = () => {
return (
<section>
<section/>
<section>
<section/>
<section>
<section/>
<footer>
<footer/>
)
} or should i use this? creating a separate file to import some of the contents of my page like this for exampleconst Home = () => {
return (
<section>
<section/>
<About />
<Projects />
<footer>
<footer/>
)
}Answered by fuma
It’s a personal preference, you can separate it into multiple files if it’s too long for you.
8 Replies
It’s a personal preference, you can separate it into multiple files if it’s too long for you.
Answer
Both are good practices
@fuma Both are good practices
Golden paper waspOP
thanks thanks!!!
@Golden paper wasp thanks thanks!!!
also both are invalid
you need to have a single parent
can just wrap it in #Unknown Channel</>
I personally separate it out when it gets big (to make it clear) or when i want to reuse it for other pages
@DirtyCajunRice | AppDir can just wrap it in <></>
I think it’s just for showing the structure, not the actual code