faraz amiruddin
1 min readJun 21, 2020

--

  1. I will place the modal component in the same file as the page that it is rendered on. For example, If I have a LoginModal that is displayed on the HomePage, I will define that component in the HomePage.tsx file.
  2. I keep everything in the same file, as long as it’s not being used anywhere else. I often have multiple components in the same file, and for complex state I will write a custom hook.

Hope that helps!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

faraz amiruddin
faraz amiruddin

Written by faraz amiruddin

software engineer. building retro.app in public. love react x firebase.

No responses yet

Write a response