loading...

re: An Opinionated Guide to React: Folder Structure & File Naming VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I see you have /components for shared components and /pages for the exact page matches, but what do you do with one-off components? For example, a ...
 

That's correct! I will split up my page into sub-components, all within the same file as the page.

import * as React from 'react'

export const ContactsPage: React.FC = () => {
  return (
    <div>
      <h1>Contacts</h1>
      <ContactsList />
    </div>
  )
}

const ContactsList: React.FC = () => { ... }
Code of Conduct Report abuse