DEV Community

Discussion on: what's The next step for a static React js app ?

Collapse
 
dance2die profile image
Sung M. Kim • Edited

You could write a static site by hand but as far as I know the effort to emulate static site generators such as Gatsby or Next.js (Vuepress for Vue) are pretty tough and requires a different code structure (and data structure for Gatsby as Gatsby requires you to use GraphQL).

To move onto the next step to migrate your "Sneaky-React" (🙂) you might want to check out aforementioned static site generators or other Static Site Generators site.

And I've noticed the code base that most of events are handled using Unobtrusive JavaScript way using jQuery. With React, you probably would rarely need jQuery in your React SPA and try to use built-in DOM methods such as document.querySelector/querySelectorAll and then completely remove those selectors later on (you would rarely ever need to them in React).

Yes, it's tough to wrap your head around 😅 but I believe understanding how React works and write in more React way (declarative as opposed to imperative) might help before moving toward a static site generation.

And also you might want to totally separate the frontend from the backend code to get started (Please let me know if this would not be a good idea as I am not too familiar with Next or other SSR React frameworks)

Collapse
 
haamida profile image
Hamida

Oh I see, by static I didn't want to refer to Gatsby or alike solutions (that's what comes out when I think in french and write in english 😅) , I meant that as far, my webapp do nothing but display some data with no iteractions with the user or the server.
That being said, as am still on baby steps with react, I think its still early for me to venture into SSR frameworks.(trying realy hard not to jump into the next shiny thing with no proper knowledge in the current thing)

Collapse
 
dance2die profile image
Sung M. Kim

I'd have hard time with Symphony before learning PHP (, which I've never used before) 😉

Thread Thread
 
haamida profile image
Hamida

I feel you with that.I see you already have an up and running app in React
( bunpkg.com/ ) it's pretty interesting, what did you use for it's backend side ?

Thread Thread
 
dance2die profile image
Sung M. Kim • Edited

Thanks~

I used Node Express.js for the backend - github.com/dance2die/bunpkg-server

And it's published on Heroku free tier (so the first request takes awhile 😅)