<?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: Eddie</title>
    <description>The latest articles on DEV Community by Eddie (@eddiecooro).</description>
    <link>https://dev.to/eddiecooro</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%2F97456%2Fd4d0f58a-6c91-4ae8-b43e-cfe54c3fe33b.jpg</url>
      <title>DEV Community: Eddie</title>
      <link>https://dev.to/eddiecooro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eddiecooro"/>
    <language>en</language>
    <item>
      <title>What React team is working on? (part two - forwards &amp; backwards revealOrder)</title>
      <dc:creator>Eddie</dc:creator>
      <pubDate>Wed, 24 Jul 2019 15:05:55 +0000</pubDate>
      <link>https://dev.to/eddiecooro/what-react-team-is-working-on-part-two-forwards-backwards-revealorder-55dj</link>
      <guid>https://dev.to/eddiecooro/what-react-team-is-working-on-part-two-forwards-backwards-revealorder-55dj</guid>
      <description>&lt;p&gt;Okay. Several days after merging this commit:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/eddiecooro" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F97456%2Fd4d0f58a-6c91-4ae8-b43e-cfe54c3fe33b.jpg" alt="eddiecooro"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/eddiecooro/what-react-team-is-working-on-part-one-suspenselist-component-1k9b" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;What React team is working on? (part one): SuspenseList component&lt;/h2&gt;
      &lt;h3&gt;Eddie ・ Jul 22 '19&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#react&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#suspenselist&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#reactcore&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
Sebastian opened another pull request to the master branch. In this pull request, He added two more options for the "revealOrder" property.

&lt;p&gt;&lt;a href="https://eddie-cooro.github.io/suspense-list-forwards-demo/" rel="noopener noreferrer"&gt;Working DEMO&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  1. forwards
&lt;/h1&gt;

&lt;p&gt;This option makes the child suspense components to show their contents in order from the first one to the last.&lt;br&gt;
For example, consider the same code from the previous post; but this time with "revealOrder" property set to "forwards":&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fqu33xhvcywbmqd84kg96.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fqu33xhvcywbmqd84kg96.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now if the FirstSuspendingComponent resolves first, it will show its content immediately. But if the SecondSuspendingComponent resolves before the FirstSuspendingComponent, It will wait for the FirstSuspendingComponent to resolve. After that, they both will display their contents at the same time.&lt;/p&gt;
&lt;h1&gt;
  
  
  2. backwards
&lt;/h1&gt;

&lt;p&gt;"backwards" actually acts as the reverse of the "forwards." Every Suspense component will wait for other Suspenses which came after it to resolve before showing its content.&lt;/p&gt;

&lt;p&gt;PR:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_github-liquid-tag"&gt;
  &lt;h1&gt;
    &lt;a href="https://github.com/facebook/react/pull/15918" rel="noopener noreferrer"&gt;
      &lt;img class="github-logo" alt="GitHub logo" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg"&gt;
      &lt;span class="issue-title"&gt;
        Add forwards and backwards options to SuspenseList
      &lt;/span&gt;
      &lt;span class="issue-number"&gt;#15918&lt;/span&gt;
    &lt;/a&gt;
  &lt;/h1&gt;
  &lt;div class="github-thread"&gt;
    &lt;div class="timeline-comment-header"&gt;
      &lt;a href="https://github.com/sebmarkbage" rel="noopener noreferrer"&gt;
        &lt;img class="github-liquid-tag-img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Favatars2.githubusercontent.com%2Fu%2F63648%3Fv%3D4" alt="sebmarkbage avatar"&gt;
      &lt;/a&gt;
      &lt;div class="timeline-comment-header-text"&gt;
        &lt;strong&gt;
          &lt;a href="https://github.com/sebmarkbage" rel="noopener noreferrer"&gt;sebmarkbage&lt;/a&gt;
        &lt;/strong&gt; posted on &lt;a href="https://github.com/facebook/react/pull/15918" rel="noopener noreferrer"&gt;&lt;time&gt;Jun 19, 2019&lt;/time&gt;&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag-github-body"&gt;
      &lt;p&gt;Builds on top of #15902&lt;/p&gt;
&lt;p&gt;I'm not super happy with this implementation yet but it seems to work. I also need more tests.&lt;/p&gt;
&lt;p&gt;So putting it out there as an early review.&lt;/p&gt;

    &lt;/div&gt;
    &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/facebook/react/pull/15918" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>react</category>
      <category>suspenselist</category>
      <category>revealorder</category>
    </item>
    <item>
      <title>What React team is working on? (part one): SuspenseList component</title>
      <dc:creator>Eddie</dc:creator>
      <pubDate>Mon, 22 Jul 2019 17:01:30 +0000</pubDate>
      <link>https://dev.to/eddiecooro/what-react-team-is-working-on-part-one-suspenselist-component-1k9b</link>
      <guid>https://dev.to/eddiecooro/what-react-team-is-working-on-part-one-suspenselist-component-1k9b</guid>
      <description>&lt;p&gt;About one month ago, I saw some interesting commits on the master branch of the React repository.&lt;br&gt;
&lt;em&gt;Sebastian Markbage&lt;/em&gt;, chief-developer of React team, was working on something called &lt;code&gt;SuspenseList&lt;/code&gt;: a component that is supposed to direct and orchestrate several other &lt;code&gt;Suspense&lt;/code&gt; components.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://eddie-cooro.github.io/suspense-list-together-demo/" rel="noopener noreferrer"&gt;&amp;lt;SuspenseList&amp;gt; Demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Through the first commits, the basic functionalities of the &lt;code&gt;SuspenseList&lt;/code&gt; component are completed, which gives us an API like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fr4rfvggp0hxgflu26xon.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fr4rfvggp0hxgflu26xon.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s suppose we have two components in this example: The &lt;strong&gt;FirstSuspendingComponent&lt;/strong&gt; and the &lt;strong&gt;SecondSuspendingComponent&lt;/strong&gt;.&lt;br&gt;
These components will throw a promise in their first render and will be suspended then.&lt;/p&gt;

&lt;p&gt;So after the first render pass, we will see both “&lt;code&gt;loading first&lt;/code&gt;” and “&lt;code&gt;loading second&lt;/code&gt;” spans on the screen.&lt;br&gt;
Now the &lt;strong&gt;FirstSuspendingComponent&lt;/strong&gt; resolves its promise and tries to display its content, but it cannot. That is because the &lt;strong&gt;SecondSuspendingComponent&lt;/strong&gt; is still suspended and the "revealOrder" property of their first &lt;code&gt;SuspenseList&lt;/code&gt; parent component is equaled to "&lt;code&gt;together&lt;/code&gt;."&lt;br&gt;
Therefore, the &lt;strong&gt;FirstSuspendingComponent&lt;/strong&gt; still shows its fallback (the "&lt;code&gt;loading first&lt;/code&gt;" span) and waits for the &lt;strong&gt;SecondSuspendingComponent&lt;/strong&gt; to finish its work. After that, they both will be displayed at the same time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/facebook/react/pull/15902" rel="noopener noreferrer"&gt;https://github.com/facebook/react/pull/15902&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>suspenselist</category>
      <category>reactcore</category>
    </item>
  </channel>
</rss>
