I've been working with PHP and MySQL, along with the usual HTML, CSS, JS, and jQuery, for years. Recently, I tried diving into React after seeing a cool React + Tailwind portfolio template online, but I found the setup pretty overwhelming. The component structure just seemed unnecessarily complex for what I wanted to achieve.
When I ran my test, it felt like the browser was shaking every time I made a change because it was loading so many JavaScript and CSS files—over 20 scripts! This made me worried, especially considering SEO aspects too.
I'm used to keeping things simple with PHP on the server side by only sending what's needed for a page, leading to fewer requests and faster load times. If I can manage server-side components this way, I'm wondering: should I fully switch to React on the frontend? Or should I stick with what works for me? Is there a genuine benefit to moving to React that I'm missing?
2 Answers
It sounds like you're not factoring in server-side rendering (SSR) vs. React's client-side rendering. They serve different needs! If you primarily create simple static sites, PHP is great; it’s straightforward and quick. But if you ever need more interactive features or plan to scale, React might just make sense. Sure, it feels heavy at first, but it can offer significant advantages down the line for dynamic content.
From my experience, sticking with what you know is often a good call. I've been developing for over 20 years, mainly using PHP, HTML, and JS. React seems like it's just adding complexity without real benefits for simpler websites. I find that sticking to the basics has served me just fine, focusing on core technologies without diving into React's peculiarities. I wouldn't say React is essential if you’re already comfortable managing components effectively with PHP.
Yeah, but the complexity of React can overshadow its benefits for smaller projects. It just can be too much sometimes!