Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration from pages to app #14

Closed
mrbodich opened this issue May 27, 2023 · 14 comments
Closed

Migration from pages to app #14

mrbodich opened this issue May 27, 2023 · 14 comments

Comments

@mrbodich
Copy link

Hello. Do you have a plan to migrate your template from the pages to the app next.js directory?

@kitloong
Copy link
Owner

Hi @mrbodich

Yes it is in my roadmap.

@mrbodich
Copy link
Author

Thank you! Do you have any rough estimate? I just need to understand if I can wait a bit or it would take to long.

@kitloong
Copy link
Owner

Most likely by this or next week.

@kitloong
Copy link
Owner

I would like to migrate pages to app however, react-bootstrap does not currently offer official support for server-side rendering.
react-bootstrap/react-bootstrap#6475

I am currently stuck here until they release official support, or we may need to explore an alternate package.

@pjanickovic
Copy link

hello, any update ?

@kitloong
Copy link
Owner

Hi @pjanickovic , it is still in progress

@kitloong
Copy link
Owner

Unable to use dot notation component in server component

react-bootstrap/react-bootstrap#6669
vercel/next.js#51593

@pjanickovic
Copy link

@kitloong do you think it has a chance?

I am about to migrate a CRA into nextjs. My app uses bootstrap so your bolierplate seems like a good start.

Thx

@kitloong
Copy link
Owner

Hi @pjanickovic Please check out the main branch for app routers

@pjanickovic
Copy link

pjanickovic commented Dec 27, 2023 via email

@kitloong
Copy link
Owner

kitloong commented Dec 28, 2023

In my personal preference, I find the CoreUI styling and its mobile phone view design, especially the sidebar navigation for different views, quite appealing. I opt for react-bootstrap due to CoreUI being built with Bootstrap.

I like the idea of Tailwind CSS. I will use utility classes whenever it is possible, as indicated in the source code.

However, the migration from Bootstrap to Tailwind is time-consuming, considering to keep the current look and feel.
Therefore, I'll stick with Bootstrap for the time being.

The "First Load JS shared by all" of Bootstrap is actually not too bad.

Bootstrap

First Load JS shared by all            81.9 kB
  ├ chunks/304-2c813878acae82de.js       26.7 kB
  ├ chunks/db04793a-7454ef3286dc9a39.js  53.3 kB
  ├ chunks/main-app-5ca2ca3509950073.js  218 B
  └ chunks/webpack-bdda0116d5d2c410.js   1.74 kB

Vanilla Next.JS

+ First Load JS shared by all            81.8 kB
  ├ chunks/402-67f396e5bf753411.js       26.7 kB
  ├ chunks/d6e4f393-23d47c90565b18f6.js  53.3 kB
  ├ chunks/main-app-79184e85c53ddfb2.js  220 B
  └ chunks/webpack-0827b8f6e3e08c17.js   1.64 kB

But of course, there is overhead to downloading a total 40kb of bootstrap.css (sadly, I can't find a proven way to purge the CSS), and possible another 10kb for bootstrap.js depending on usage, take it as trade-off for the time saved on building styling from scratch.

I think the team members learning curve and future maintenance cost should be taken into account too if you are building an enterprise-ready product.

These opinions are personal, and I welcome any suggestions.

@pjanickovic
Copy link

well said, but still, SSR (Server Side Rendering) support does not work well,

I see you did not add the to wrap the app, what that intentional ? (link: https://react-bootstrap.netlify.app/docs/getting-started/server-side-rendering/)

when I add it, I implicitly need to add "use client" because Bootstrap relays on the context (the long thread you posted above has a heavy discussion).

I agree the footprint for both is quite ok, even when i count the css.

My case is I have been working on an internal dashboard, which in 2 years grew significantly, now accomodating data from various internal systems, support processes etc. currently built on CRA, and I know it will grow more, so I am looking for a right approach.

Preliminary I choose nextjs because of new support for SSR, RSC, and seems Bootstrap is not a match for this.

@kitloong
Copy link
Owner

SSRProvider is not needed in React 18 or above. Next.JS server component and client component are ssr by default.

@pjanickovic
Copy link

pjanickovic commented Dec 31, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants