<?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: elba engineering blog</title>
    <description>The latest articles on DEV Community by elba engineering blog (@elba-engineering).</description>
    <link>https://dev.to/elba-engineering</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%2Forganization%2Fprofile_image%2F5402%2Fcbcc5948-dfe2-44e0-93ca-f891ec8a9366.jpeg</url>
      <title>DEV Community: elba engineering blog</title>
      <link>https://dev.to/elba-engineering</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/elba-engineering"/>
    <language>en</language>
    <item>
      <title>Trying out Next.js url imports with Framer handshake feature</title>
      <dc:creator>Antoine Berton</dc:creator>
      <pubDate>Tue, 08 Mar 2022 10:22:00 +0000</pubDate>
      <link>https://dev.to/elba-engineering/trying-out-nextjs-url-imports-with-framer-handshake-feature-56fg</link>
      <guid>https://dev.to/elba-engineering/trying-out-nextjs-url-imports-with-framer-handshake-feature-56fg</guid>
      <description>&lt;p&gt;At &lt;a href="https://www.elba.security/"&gt;elba&lt;/a&gt;, our core mission is to empower employees with the knowledge they need to mitigate cybersecurity risks.&lt;br&gt;
For this we need to offer training content that is dynamic, various and engaging.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When learning on elba you should be able to interact with the content at another level than if it was just a video or a quiz. For example when learning about choosing secure passwords, the UI would show you how long it would approximately take to brute-force your password, right as you are typing it. When learning about how to recognise a phishing email, you would be presented with an interactive email that you can click and hover around.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To achieve this result, using a LMS, a CMS or a rigid database structure as the source to generate the learning pages around a few front-end templates was out of the way.&lt;/p&gt;

&lt;p&gt;And … we had another, important requirement : iterate fast to quickly release our MVP.&lt;/p&gt;

&lt;p&gt;So how to achieve this ? Having to develop custom interactive React components for each training sounds like a lot of development work 😮&lt;/p&gt;

&lt;h2&gt;
  
  
  Next.js url imports to the rescue !
&lt;/h2&gt;

&lt;p&gt;As big fans of &lt;a href="https://nextjs.org/"&gt;Next.js&lt;/a&gt; / &lt;a href="https://vercel.com/"&gt;Vercel&lt;/a&gt;, we were thrilled by Next.js 12 announcement and eager to try some of the new features !&lt;br&gt;
It turned out one of them was perfect for our use case, &lt;a href="https://nextjs.org/docs/api-reference/next.config.js/url-imports"&gt;URL imports&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Here is the flow :
&lt;/h3&gt;

&lt;p&gt;1 - Our design team will design an interactive component in a tool like Framer, then use, in Framer's case, the &lt;a href="https://www.framer.com/docs/guides/handshake/"&gt;handshake&lt;/a&gt; feature. In one click, handshake converts the component into a React component and serve it as an ES module on a CDN !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zBqmMUwc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nyhxq5nxdm1i1i770sb3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zBqmMUwc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nyhxq5nxdm1i1i770sb3.png" alt="Designing the component on Framer" width="880" height="585"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;b&gt;Designing the component on Framer&lt;/b&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M-s5eQBJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nrrg4ocsfugedrktjfjd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M-s5eQBJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nrrg4ocsfugedrktjfjd.png" alt="Configuring variables to make the component dynamic 🚀" width="880" height="666"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;b&gt;Configuring variables to make the component dynamic 😎&lt;/b&gt;



&lt;p&gt;&lt;br&gt;&lt;br&gt;
2 - We import the component from the CDN URL into our React code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iiSzqp49--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cr3wtf7iuh86s7dd0rwy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iiSzqp49--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cr3wtf7iuh86s7dd0rwy.png" alt="" width="880" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Notes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;With handshake, a new URL will be generated for each version of the component&lt;/li&gt;
&lt;li&gt;When editing the URL in your code, make sure to run &lt;code&gt;next dev&lt;/code&gt; which takes care of discovering new URL imports and regenerate your next lockfile.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Thanks to URL imports we were able to produce highly engaging content without sacrificing too much time integrating components. This gives us a much shorter iteration loop. From this : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--l_uTNC3_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ycwdc94hqosrrmc7fzl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--l_uTNC3_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ycwdc94hqosrrmc7fzl.png" alt="Long iteration loop" width="880" height="593"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To this :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BRqTSWdg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bmpptovhbzsi708e5lw0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BRqTSWdg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bmpptovhbzsi708e5lw0.png" alt="Fast iteration loop" width="880" height="567"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🚀🚀🚀&lt;/p&gt;

&lt;p&gt;Here is the &lt;a href="https://github.com/n2ctech/poc-framer"&gt;repo&lt;/a&gt; to the code for the POC we made with the email component. &lt;/p&gt;

&lt;p&gt;You can get started quickly with Next.js 12 and Framer by following the instructions &lt;a href="https://www.framer.com/docs/guides/handshake/"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Interested in joining an early stage startup backed by &lt;a href="https://www.efounders.com/"&gt;eFounders&lt;/a&gt; in the cyber-security space ? Check-out our open positions bellow : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.welcometothejungle.com/en/companies/efounders/jobs/frontend-software-engineer-elba_paris"&gt;Front-end software engineer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.welcometothejungle.com/en/companies/efounders/jobs/fullstack-engineer-elba_paris"&gt;Full-stack software engineer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.welcometothejungle.com/en/companies/efounders/jobs/senior-fullstack-engineer-elba_paris"&gt;Senior full-stack engineer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
