<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Max Phillips</title>
    <description>The latest articles on DEV Community by Max Phillips (@maxphillipsdev).</description>
    <link>https://dev.to/maxphillipsdev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F473140%2F837a3a1e-4982-4c73-963f-1ebb2249afd9.gif</url>
      <title>DEV Community: Max Phillips</title>
      <link>https://dev.to/maxphillipsdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maxphillipsdev"/>
    <language>en</language>
    <item>
      <title>Exploring React Native</title>
      <dc:creator>Max Phillips</dc:creator>
      <pubDate>Sat, 12 Aug 2023 00:00:00 +0000</pubDate>
      <link>https://dev.to/maxphillipsdev/exploring-react-native-434g</link>
      <guid>https://dev.to/maxphillipsdev/exploring-react-native-434g</guid>
      <description>&lt;p&gt;How does React Native, &lt;em&gt;React Native??&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;React Native is a pretty cool tool, although when learning it I encountered a rather strange difficulty curve:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wPj--bfy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.maxphillips.dev/rn-frustration.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wPj--bfy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.maxphillips.dev/rn-frustration.png" alt="" width="800" height="709"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yeah, a bit strange :(&lt;/p&gt;

&lt;p&gt;While this curve is just my own experience with React Native, I like to think I am not alone in this. Upgrades in particular &lt;a href="https://results.stateofreactnative.com/opinions/#opinions_pain_points"&gt;were listed as the number one pain point for React Native developers in the &lt;em&gt;State of React Native&lt;/em&gt; survey,&lt;/a&gt; with debugging coming in second. More recent tools in the React Native ecosystem (such as &lt;a href="https://expo.dev/"&gt;Expo&lt;/a&gt;) even seem designed to directly address these sorts of issues.&lt;/p&gt;

&lt;p&gt;The truth is that React Native feels kind of magical to use, and that is both a blessing and curse. Writing app logic in React and being able to run it on a mobile device it awesome, but if you stray too far off the beaten path you might start to encounter weird bugs and need to use dark spells like &lt;code&gt;BatchedBridge.spy()&lt;/code&gt;, &lt;code&gt;UIManager.dispatchViewManagerCommand()&lt;/code&gt;, or even &lt;a href="https://github.com/facebook/react-native/blob/9f7dfcc35ff603de42cfa5e3fa63701916a86784/packages/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js#L37C4-L37C4"&gt;&lt;code&gt;React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;&lt;/code&gt;&lt;/a&gt; to patch them up. (ok maybe not that last one)&lt;/p&gt;

&lt;p&gt;As someone who came from the web dev side of things I was pretty reluctant to touch native code at first, but after working with it for a bit I gotta say it has helped make those earlier pain points a lot less annoying to deal with. Logbox errors seem less esoteric, upgrades seem (just a bit) less scary, and when something breaks it has made it a lot easier to know where to start looking.&lt;/p&gt;

&lt;p&gt;Anyway, that's enough preamble :) The main reason I made this post is because I wanna start sharing some of this weird React Native stuff on this blog, and I reckon a neat infographic would be a good place to start.&lt;/p&gt;

&lt;p&gt;Please let me know in the comments below what you think (or if I goofed anything up lol), and if you enjoyed it then check back soon for a follow up where I wanna cover some stuff about the React Native Bridge system :)&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pqe9vddE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.maxphillips.dev/rn-intro.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pqe9vddE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.maxphillips.dev/rn-intro.png" alt="" width="800" height="1752"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Medium Style Image Blur-Up Loading with Gatsby-Image</title>
      <dc:creator>Max Phillips</dc:creator>
      <pubDate>Fri, 02 Apr 2021 02:07:13 +0000</pubDate>
      <link>https://dev.to/maxphillipsdev/guide-medium-style-image-blur-up-loading-with-gatsby-image-1heg</link>
      <guid>https://dev.to/maxphillipsdev/guide-medium-style-image-blur-up-loading-with-gatsby-image-1heg</guid>
      <description>&lt;p&gt;Although the subscription wall can be annoying, I think it fair to say Medium is a pretty great blogging platform. It's simple to use, feature loaded, but most importantly its really fast. &lt;/p&gt;

&lt;p&gt;A lot of different things go into making a website fast (&lt;a href="https://web.dev/fast/"&gt;Check Web.Dev for more tips&lt;/a&gt;) but one thing that Medium does especially well is Progressive Image Loading.&lt;/p&gt;

&lt;p&gt;Progressive Image Loading, also known as the Low Quality Image Placeholder(LQIP) pattern, is simply the technique of loading a low quality version of your image first, and then lazy loading a full size version once the main page content has loaded. &lt;/p&gt;

&lt;p&gt;The effect this has is a bit similar to using skeleton content, and it can do wonders for the perceived performance of your website and help cut on the first contentful paint (FCP) time. With GatsbyJS LQIP comes out-of-the-box with the Gatsby-Image plugin though if you want to use it ouside of Gatsby feel free to check-out &lt;a href="https://github.com/aFarkas/lazysizes#lqipblurry-image-placeholderblur-up-image-technique"&gt;lazysizes&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;In Gatsby though, blur up isn't actually enabled by default, and ends up being all too often overlooked. Because of this a lot of sites will show a not so pretty pixelated or compressed version of the image instead of a nice blurred version. Thanks to the &lt;code&gt;placeholderStyle&lt;/code&gt; attribute though, fixing this is actually as easy as a single extra line of JSX.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Img&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gatsby-image&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Img&lt;/span&gt;
    &lt;span class="nx"&gt;fluid&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;someFluidSrcImage&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;imageTitle&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;placeholderStyle&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="na"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`blur(1.5rem)`&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
  &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By adding the &lt;code&gt;placeholderStyle&lt;/code&gt; attribute we can apply styles to the image that gets loaded in as a placeholder, and Gatsby handles the rest! Add a blur, pixilation or any other kind of CSS filter you like. Here's what the end result looks like for me.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvdaj6srojexoom3t9ynn.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvdaj6srojexoom3t9ynn.gif" alt="The end result" width="628" height="543"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know if you have any questions, and hope you found this useful!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on my blog at &lt;a href="https://www.maxphillips.dev"&gt;maxphillips.dev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>gatsby</category>
      <category>performance</category>
      <category>react</category>
      <category>jamstack</category>
    </item>
  </channel>
</rss>
