Skip to main content

FAQ

Why use two branches?

A number of reasons:

  • gradual adoption of a sane and clean codebase structure, don't have to migrate everything in one go
  • don't have to worry about breaking any existing features in the current codebase
  • don't have to worry about library, state management or other conflicts
  • existing features (especially the codepanel) depend on global bootstrap styles and the styles are hard to isolate properly (so they don't affect new pages/features)
  • it's easy enough to temporarily redirect specific routes/pages/features to another version of the app. Once an existing feature has been migrated (muiv5 + other refactoring) to the new branch n, the redirect can be removed.

Why not just use the main branch (CRA app) as the legacy branch?

  • A lot of styling and bundle-size optimizations were already made to the n-legacy next.js branch
  • a good intro to next.js for those devs who are not yet familiar
  • devs can already begin work on upgrading specific features to mui v5 on the n-legacy branch
  • any work done on the next.js legacy branch n-legacy will be easier to migrate to the n branch because they both use next.js
  • Additionally, it's easier to set up the path-based redirects (see Architecture) from the n branch when using next.js on both branches