<?xml version="1.0" encoding="utf-8"?>
  <rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:georss="http://www.georss.org/georss"
    xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
  >
    <channel>
      <title>Piccalilli - React topic archive</title>
      <link>https://piccalil.li/</link>
      <atom:link href="https://piccalil.li/category/react.xml" rel="self" type="application/rss+xml" />
      <description>We are Piccalilli. A publication dedicated to providing high quality educational content to level up your front-end skills.</description>
      <language>en-GB</language>
      <copyright>Piccalilli - React topic archive 2026</copyright>
      <docs>https://www.rssboard.org/rss-specification</docs>
      <pubDate>Tue, 07 Apr 2026 01:02:02 GMT</pubDate>
      <lastBuildDate>Tue, 07 Apr 2026 01:02:02 GMT</lastBuildDate>

      
      <item>
        <title>Upcoming custom element support in React</title>
        <link>https://piccalil.li/blog/upcoming-custom-element-support-in-react/?ref=react-category-rss-feed</link>
        <dc:creator><![CDATA[Andy Bell]]></dc:creator>
        <pubDate>Wed, 01 May 2024 07:55:56 GMT</pubDate>
        <guid isPermaLink="true">https://piccalil.li/blog/upcoming-custom-element-support-in-react/?ref=react-category-rss-feed</guid>
        <description><![CDATA[<p>I’ve written earlier in the year about how <a href="https://piccalil.li/blog/react-is-getting-a-bit-of-a-kicking-recently">React was getting a bit of a kicking</a> and a contributing factor to that was a seemingly excruciatingly slow pace of progress. That has potentially been remedied by the recently announced <a href="https://react.dev/blog/2024/04/25/react-19#whats-new-in-react-19">React 19 Beta</a>.</p>
<p>I’ll be honest, a lot of the stuff announced went completely over my head, but the jewel amongst all of that was the <a href="https://react.dev/blog/2024/04/25/react-19#support-for-custom-elements">increased support for web components and custom elements</a>.</p>
<p>React has <em>long</em> been a criticised for their their low performance on the <a href="https://custom-elements-everywhere.com/">Custom Elements Everywhere benchmark</a>, but the additions in version 19 Beta might drastically change that. Before, React was getting a paltry 67% score, in comparison to the vast majority of React’s competitors getting over 90%. That’s all change with React 19 Beta though, <a href="https://custom-elements-everywhere.com/libraries/react-experimental/results/results.html">boasting a 100% score</a>. Impressive stuff.</p>
<p>I’m always leaning towards the platform and especially so with custom elements. You might remember how deep I got into them and native web component stuff in general, in 2018, after <a href="https://meowni.ca/">Monica Dinculescu</a> delivered <a href="https://m.youtube.com/watch?v=we3lLo-UFtk&amp;feature=youtu.be">an astounding talk at Google I/O ’18</a>. Since then I’ve used them a lot and in some cases for client work, their capabilities have been really stretched. One stumbling block there was that managing state in a densely custom element powered front-end was really tough and got messy rather quickly. One thing React is very good at though, is managing state.</p>
<p>Look, it’s no surprise that by nature of working in client services, we see a lot of different types of codebases <a href="https://set.studio/">at the studio</a>. React features quite a lot, but so do all different types of technology combinations. Every client is often — and should be — running their own race at the end of the day.</p>
<p>There are some projects on our radar though that I think would really benefit from the efficient state management of React enhancing an already well populated collection of web components. The above mentioned project would definitely benefit from that.</p>
<p>On the other hand though, integrating React as a state management later is a hell of an undertaking in terms of major surgery on a platform. One of the scariest parts is that admittedly, a lot of these components do a lot more than what they should be: rendering an output and sometimes, sending data back. They would need extensive refactoring which immediately puts us in major feature territory.</p>
<p>At that point, does it not make sense to rearchitect components in JSX? Maybe, but what you don’t get with JSX is interoperability because unlike custom elements, JSX isn’t a web standard. The investment in using custom elements seems quite cheap with the knowledge that React will probably fall out of favour, which up until recently, based on the slow speed of progress — amusingly which is often a critique of web standards by framework enthusiasts — seemed sooner rather than later. Sure, platforms like Astro and libraries like preact use JSX, but I think we can all agree, it’s synonymous with React.</p>
<p>I also really like JSX to be honest. It’s a good developer experience and makes writing stateful components a breeze. Although I find templating frustrating with “raw” web components and <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals">template literals</a>, there are lots of great solutions out there that make that sort of stuff easier, then compile to proper custom elements. It becomes easy to forgo minimal developer experience gains for the greater good.</p>
<p>Saying that, a tool that allowed you to author JSX and stuff like hooks that then compiled to maintainable web components — should a framework like React fall out of favour — might well be a huge success.</p>
<div><h2>FYI</h2>
  Turns out that tool is [Stencil](https://stenciljs.com/docs/introduction), which [Guillaume kindly shared with me](https://mastodon.social/@blokche/112364926581738597).
</div>
<p>It’s going to be interesting keeping an eye on the custom element world with upcoming complete support in React, that’s for sure.</p>
        
        ]]></description>
        
      </item>
    
      <item>
        <title>It feels like React is getting a bit of a kicking recently</title>
        <link>https://piccalil.li/blog/react-is-getting-a-bit-of-a-kicking-recently/?ref=react-category-rss-feed</link>
        <dc:creator><![CDATA[Andy Bell]]></dc:creator>
        <pubDate>Wed, 31 Jan 2024 09:55:00 GMT</pubDate>
        <guid isPermaLink="true">https://piccalil.li/blog/react-is-getting-a-bit-of-a-kicking-recently/?ref=react-category-rss-feed</guid>
        <description><![CDATA[<p>It feels like React is getting a bit of a kicking recently, which I’m not 100% against, but I can’t stress enough how ingrained React is. It’s what happens when a framework or library is the hot topic for over a decade!</p>
<p>I’ve just been reading “<a href="https://begin.com/blog/posts/2024-01-26-removing-react-is-just-weakness-leaving-your-codebase">Removing React is just weakness leaving your codebase</a>”. I don’t really agree with some of the sentiment in the article, but I like how the author has referenced concerns about what happens if a big framework player like Vercel goes away. That’s an important and concerning reality. I’m not 100% convinced React is always a weakness though, especially when you apply a bit more nuance.</p>
<p>Vercel are behind Next.js, which is arguably the most popular React framework out there. I guess it feels important to me that they don’t go away because Netlify’s recent fall from grace has had a tangible impact not just on the web community, but also our clients — some of which are now embarking on re-platforming projects, including moving to Next.js. Netlify has just not been good enough for big projects in our experience.</p>
<p>It is always a concern that technology’s survival depends on VC-funded companies, but that’s a topic for another day entirely. One thing that this definitely does though, is create a fragile basis for the web.</p>
<h2>Libraries and frameworks can be very useful in complex projects</h2>
<p>This is especially in the case of projects that require a lot of complicated state management. This is something that is <em>very</em> difficult and messy, both with web components and native JavaScript. Currently, anyway.</p>
<p>A dream of mine is native reactive state — both global and local — in web components that doesn’t require DOM selection and manipulation. That is something I do very much like about React and Vue. The problem is, you get good state-management with frameworks, but also massive bundles of JavaScript on the client-side as a symptom of that. It becomes a developer experience beating user experience situation. Not great.</p>
<p>I see a lot of weird and wonderful stuff working in client services. In the 15+ years I’ve been doing client stuff — with brief stints in product teams — I’ve never once seen the same project setup. Of course I’ve seen simple websites, over-engineered with React-based codebases, but I’ve also seen the inverse: very complicated systems, stitched together with an SSG, Nunjucks and web components that frankly, are a nightmare to maintain and improve. The incorrect decision has probably been made at the start of these projects and expensive technical debt has also likely been cashed in.</p>
<p>If you want my two cents: React ain’t going anywhere for a long time. I don’t use big tech companies as the barometer for that opinion because big tech companies make up a tiny percentage of the overall industry. They’re just louder than everyone else.</p>
<p>The main reason I think React is going nowhere is because — even though it is <a href="https://andy-bell.co.uk/the-extremely-loud-minority/">very much a minority player in the industry</a> — there are still <em>thousands</em>, if not millions of codebases that are heavily React-based.</p>
<p>Do I like this reality? Not especially, no, but I’ve sort of gotten over it now. I don’t like the fact that libraries like React are so heavily used, but over the years, I’ve grown more empathetic about the decision by teams to use them. The web platform doesn’t currently give us all the tools we might need, but I’m hopeful it will in the longer term. I also get that people can’t wait for that and need to get moving, so libraries service their needs better than the web platform currently does.</p>
<p>It looks like React is going to be releasing a v19 of their framework. Just today I spotted that <a href="https://github.com/facebook/react/issues/11347#issuecomment-1899140345">they are going to be supporting custom elements</a> — AKA web components, which has been requested for 6+ years at this point. It’ll be interesting to see how that works because I think that <em>could</em> be a decent setup: React to do all the complicated state stuff and web components to do the rendering of stuff. It’ll make moving away from React a hell of a lot easier in my opinion. Great for design systems too.</p>
<h2>What should you use on your project then?</h2>
<p>I honestly couldn’t answer that. Once upon a time I would have tweeted that React should not be used under any circumstances, but at the time, I’d only seen really grim, over-complicated codebases powering very simple contexts. The culture of React discourse was extremely toxic too (still is sometimes) and I didn’t want to support that in any capacity. A few more years down the line though, I’ve seen lots of very complicated projects, underpowered with a valiant attempt to not use frameworks of any kind.</p>
<p>It’s all about trade-offs in the real world. What capabilities do you have in-house? What are the performance needs of your project? Are you on a hard deadline? Do you want to attract a certain type of developer, with a certain skill-set to your team in the long term? Who are you going to exclude by choosing FrameworkX or FrameworkY? Do you oppose a framework’s funding source? What damage does a technology cause for your users?</p>
<p>Lots of questions that should be asked rather than “FrameworkX is hot at the moment: let’s use that”.</p>
<p>All I would say is finding the lowest-tech solution and leaning into browser capabilities as much as possible is a good way to build something resilient and reliable. Also avoiding doing as much client-side rendering (and re-rendering) as possible usually makes things better for everyone too. I like how Astro <a href="https://docs.astro.build/en/concepts/islands/">does that with Islands, for example</a>. I also understand that’s not possible in some projects.</p>
<p>Every project is different and every team has their own problems they need to address. My overall advice is spend a lot more time planning and strategising as you are already doing and always think “what’s the worst thing that can happen?” along with “who are we going to harm with this decision?”. It works pretty damn well for us. Planning is much deeper than breaking projects up into Trello tickets at the end of the day.</p>
<p>Most importantly, don’t base your project decisions on what some dude thinks on Twitter, Mastodon or their blog. That very much includes my opinion too because I don’t understand your project unless you bring me in to help you. Only you and your team do and it’s those opinions and expertise that really matter. Effective communication is the real cheat code.</p>
        
        ]]></description>
        
      </item>
    
      <item>
        <title>Disable client-side React with Next JS</title>
        <link>https://piccalil.li/blog/disable-client-side-react-with-next-js/?ref=react-category-rss-feed</link>
        <dc:creator><![CDATA[Andy Bell]]></dc:creator>
        <pubDate>Thu, 11 Feb 2021 00:00:00 GMT</pubDate>
        <guid isPermaLink="true">https://piccalil.li/blog/disable-client-side-react-with-next-js/?ref=react-category-rss-feed</guid>
        <description><![CDATA[<p><a href="https://nextjs.org/">Next JS</a> is a fantastic framework, but it produces some <em>eye-watering</em> client-side JavaScript bundles, thanks to <a href="https://reactjs.org/">React JS</a>’s notorious bundle sizes.</p>
<p>You can completely disable the client-side Javascript bundles with this little snippet:</p>
<pre><code>export const config = {
  unstable_runtimeJS: false
};
</code></pre>
<p>This is an experimental/beta feature, it seems, but I can vouch for how effective it is because <strong>every single page on this site is powered by Next JS and has 0kb of client-side React code</strong>!</p>
<p>Here’s an entire page component with this snippet in context, that you can use as a template for pages that you want client-side JavaScript to be disabled on:</p>
<pre><code>export const config = {
  unstable_runtimeJS: false
};

export default function MyLightweightPage({message}) {
  return (
    &lt;article&gt;
      &lt;p&gt;{message}&lt;/p&gt;
    &lt;/article&gt;
  );
}

export async function getStaticProps() {
  return {
    props: {
      message: 'Hello, world'
    }
  };
}
</code></pre>
        
        ]]></description>
        
      </item>
    
    </channel>
  </rss>
