<?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: Alexander Selorm Kubi</title>
    <description>The latest articles on DEV Community by Alexander Selorm Kubi (@xanderselorm).</description>
    <link>https://dev.to/xanderselorm</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%2F618757%2F45c22262-a03e-42f3-b9b3-7ced68b6616b.jpeg</url>
      <title>DEV Community: Alexander Selorm Kubi</title>
      <link>https://dev.to/xanderselorm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xanderselorm"/>
    <language>en</language>
    <item>
      <title>Fake Job Offers Are Turning GitHub Repos Into a Trap</title>
      <dc:creator>Alexander Selorm Kubi</dc:creator>
      <pubDate>Sun, 13 Jul 2025 02:16:13 +0000</pubDate>
      <link>https://dev.to/xanderselorm/fake-job-offers-are-turning-github-repos-into-a-trap-5fad</link>
      <guid>https://dev.to/xanderselorm/fake-job-offers-are-turning-github-repos-into-a-trap-5fad</guid>
      <description>&lt;p&gt;&lt;em&gt;A new scam is hitting developers with fake job offers and malicious GitHub repos. Here's what you really need to know to stay safe.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Perfect Setup
&lt;/h2&gt;

&lt;p&gt;Picture this: you get an email/linkedin message about a cool new developer job. Great pay, interesting tech stack, remote work. They want you to do a quick coding challenge to prove you're not a total noob. Seems legit, right?&lt;/p&gt;

&lt;p&gt;Wrong! This exact scenario is currently being used to hack developers all over the world. Security researchers (the likes of Kaspersky on GitVenom) have found multiple fake job campaigns like this.&lt;/p&gt;

&lt;h2&gt;
  
  
  How They Get You
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Fake Job Offer
&lt;/h3&gt;

&lt;p&gt;It starts innocently enough with old-school social engineering: Someone reaches out about a job opportunity. Could be through email, LinkedIn, or any other platform. The role sounds perfect for your skills, the pay is attractive, and hey, who doesn't want new opportunities?&lt;/p&gt;

&lt;p&gt;Here's the kicker: they want you to complete a "coding challenge" to prove you can handle the work. Totally normal in our industry, right? Except this time, you're about to download malware that'll steal everything from your SSH keys and passwords to your bank information (if you saved any).&lt;/p&gt;

&lt;h3&gt;
  
  
  The Legit-Looking Repo
&lt;/h3&gt;

&lt;p&gt;Once you’re hooked, they send you to a GitHub repo. It looks totally normal. We're talking full-blown applications with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Proper folder structure (frontend, backend, configs)&lt;/li&gt;
&lt;li&gt;A normal-looking package.json with real dependencies&lt;/li&gt;
&lt;li&gt;Detailed README with setup instructions
&lt;/li&gt;
&lt;li&gt;A believable commit history&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But hidden inside? Pure trouble.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Trap Hiding in Plain Sight
&lt;/h3&gt;

&lt;p&gt;Here's where things get really scary. The malicious code is hidden so well that even experienced developers are likely fooled. They're using techniques like:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Base64 Ninja Tricks&lt;/strong&gt;: All the sketchy function names and file paths are encoded in base64. You literally can't see what they're doing until the code runs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fake License Files&lt;/strong&gt;: One example had malware hidden inside what looked like a totally normal MIT license file. Who checks license files for malware :D?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dependency Poisoning&lt;/strong&gt;: They take legitimate npm packages or Python modules and inject malicious code, then include those in the project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Runtime Activation&lt;/strong&gt;: The malware only fires up when you actually run the app with &lt;code&gt;npm start&lt;/code&gt; or whatever.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Damage: It's Worse Than You Think
&lt;/h2&gt;

&lt;p&gt;Let's talk numbers because they're absolutely wild:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitVenom alone&lt;/strong&gt;: 200+ malicious repos over two years&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Money stolen&lt;/strong&gt;: Almost $500K just from crypto wallets (that we know of)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Global victims&lt;/strong&gt;: People getting hit in Russia, Brazil, Turkey, everywhere&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Still active&lt;/strong&gt;: New fake repos pop up regularly&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What They're After (Spoiler: Everything)
&lt;/h2&gt;

&lt;p&gt;When this malware runs, it's not just grabbing your browser passwords. It's going full scorched earth on your digital life:&lt;/p&gt;

&lt;h3&gt;
  
  
  Your Money
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Crypto wallet keys and seed phrases&lt;/li&gt;
&lt;li&gt;Any blockchain stuff stored in browsers&lt;/li&gt;
&lt;li&gt;They even watch your clipboard to swap crypto addresses when you copy/paste&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Auth stuff
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;SSH private keys (yes, all of them)&lt;/li&gt;
&lt;li&gt;Saved browser passwords&lt;/li&gt;
&lt;li&gt;Cookies from sites where you're logged in&lt;/li&gt;
&lt;li&gt;Your entire macOS Keychain if you're on Mac&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Your Personal Stuff
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Browser history&lt;/li&gt;
&lt;li&gt;Downloaded files&lt;/li&gt;
&lt;li&gt;Screenshots of your desktop&lt;/li&gt;
&lt;li&gt;Basically anything they think might be valuable&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Possible Backdoor Access
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Remote control of your machine&lt;/li&gt;
&lt;li&gt;Keylogger to capture everything you type&lt;/li&gt;
&lt;li&gt;Ability to mess with your files&lt;/li&gt;
&lt;li&gt;Network access to spread to other systems&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Red Flags That Should Make You Nope Right Out
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Job Offer Itself
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Unsolicited opportunities that sound too perfect&lt;/li&gt;
&lt;li&gt;Pressure to complete tasks ASAP&lt;/li&gt;
&lt;li&gt;They want you to download and run code as part of the "interview"&lt;/li&gt;
&lt;li&gt;Only communicating through email/chat (no video calls)&lt;/li&gt;
&lt;li&gt;Vague company details&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Technical Red Flags
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Tons of base64-encoded garbage scattered around&lt;/li&gt;
&lt;li&gt;Files that are included but never actually used&lt;/li&gt;
&lt;li&gt;The README says one thing but the code does something totally different&lt;/li&gt;
&lt;li&gt;Massive minified JavaScript files in weird places&lt;/li&gt;
&lt;li&gt;Dependencies that make zero sense for the project&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Account/Repo
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Brand new GitHub account with barely any history&lt;/li&gt;
&lt;li&gt;Fake contributors&lt;/li&gt;
&lt;li&gt;Multiple similar projects from the same sketchy account&lt;/li&gt;
&lt;li&gt;Fork chains that lead back to accounts with nothing legitimate&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Protect Yourself
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Don't Be an Easy Target
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Verify Everything&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Look up the company independently; don't just trust the email&lt;/li&gt;
&lt;li&gt;Find the job posting on their official website&lt;/li&gt;
&lt;li&gt;Demand a video call and ask detailed questions about the company&lt;/li&gt;
&lt;li&gt;If it sounds too good to be true, it probably is&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Isolation Is Your Friend&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use VMs, containers, or GitHub Codespaces for testing sketchy code&lt;/li&gt;
&lt;li&gt;Keep your personal and work environments completely separate&lt;/li&gt;
&lt;li&gt;Have a dedicated "testing" machine/user account/sandbox that you don't care about&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Review Everything&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Look at all files, even the boring ones.&lt;/li&gt;
&lt;li&gt;Check for weird imports or obfuscated code.&lt;/li&gt;
&lt;li&gt;If there's minified JavaScript, be extra paranoid&lt;/li&gt;
&lt;li&gt;Make sure dependencies actually match what the project claims to do&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Stay Secure&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep everything updated (OS, security software, the works)&lt;/li&gt;
&lt;li&gt;Monitor your processes and network traffic.&lt;/li&gt;
&lt;li&gt;Back up your important stuff regularly&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  If You're Running a Team
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Education Is Everything&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Train your devs about these specific threats&lt;/li&gt;
&lt;li&gt;Have clear policies about external code&lt;/li&gt;
&lt;li&gt;Plan for how to respond if someone gets compromised.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Technical Safeguards&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monitor network traffic for weird outbound connections&lt;/li&gt;
&lt;li&gt;Check external repos before running them.&lt;/li&gt;
&lt;li&gt;Keep dev environments isolated&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why This Matters for Everyone
&lt;/h2&gt;

&lt;p&gt;These scams don’t just hit individuals — they mess with the entire open-source world. When we can’t trust code or communities, we all lose.&lt;/p&gt;

&lt;p&gt;And these attackers are just getting started. Next we'll probably see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI-generated code that's even harder to spot as malicious&lt;/li&gt;
&lt;li&gt;Deepfake videos for "video interviews"&lt;/li&gt;
&lt;li&gt;Attacks that spread to cloud infra or CI/CD pipelines&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's Being Done About It
&lt;/h2&gt;

&lt;p&gt;The good news is people are fighting back:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub and Others&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Removing flagged repos.&lt;/li&gt;
&lt;li&gt;Better automated detection for suspicious patterns&lt;/li&gt;
&lt;li&gt;Stricter verification for new accounts&lt;/li&gt;
&lt;li&gt;Improved reporting tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Security Researchers&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Companies like Kaspersky and Check Point are all over this&lt;/li&gt;
&lt;li&gt;Threat intel gets shared with the whole industry&lt;/li&gt;
&lt;li&gt;Sharing intel across the security community&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Bottom Line: Stay Paranoid (In a Good Way)
&lt;/h2&gt;

&lt;p&gt;Fake job offers + malicious GitHub repos = a nightmare for developers. These scams work because they exploit our trust, curiosity, and drive to land better gigs.&lt;/p&gt;

&lt;p&gt;The good news? Just knowing this trick exists makes you way harder to fool.&lt;/p&gt;

&lt;p&gt;The most important thing to remember: If someone wants you to download and run unknown code, especially under time pressure, be careful.&lt;/p&gt;

&lt;p&gt;Here's what you should do right now:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Share this info&lt;/strong&gt; with your team/friends&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set up proper isolation&lt;/strong&gt; for testing unknown code&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Stay safe out there, and remember: if it feels sketchy, it probably is.&lt;/p&gt;




&lt;h2&gt;
  
  
  Sources:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.kaspersky.com/blog/malicious-code-in-github/53085/" rel="noopener noreferrer"&gt;Kaspersky's research on GitVenom&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.github.com/en/code-security" rel="noopener noreferrer"&gt;GitHub's security docs&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.nist.gov/cyberframework" rel="noopener noreferrer"&gt;NIST Cybersecurity Framework&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openssf.org/" rel="noopener noreferrer"&gt;Open Source Security Foundation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>softwareengineering</category>
      <category>cybersecurity</category>
      <category>github</category>
      <category>security</category>
    </item>
    <item>
      <title>Design’s Liquid Memory: Drops from Apple’s Liquid Glass</title>
      <dc:creator>Alexander Selorm Kubi</dc:creator>
      <pubDate>Fri, 13 Jun 2025 12:24:48 +0000</pubDate>
      <link>https://dev.to/xanderselorm/designs-liquid-memory-lessons-from-apples-liquid-glass-35la</link>
      <guid>https://dev.to/xanderselorm/designs-liquid-memory-lessons-from-apples-liquid-glass-35la</guid>
      <description>&lt;h2&gt;
  
  
  Design Moves in Cycles: Why “Too Early” Isn’t the Same as “Wrong”
&lt;/h2&gt;

&lt;p&gt;Looking at the Liquid Glass UI updates currently available in its beta stage, and recent discussions on social media concerning it got me thinking about how design trends actually work: &lt;strong&gt;design doesn’t just progress—it cycles.&lt;/strong&gt; What feels cutting-edge today can seem outdated tomorrow, and what was dismissed as over-the-top years ago might suddenly feel visionary.&lt;/p&gt;

&lt;p&gt;Take Microsoft’s &lt;strong&gt;Aero&lt;/strong&gt; interface from the Windows Vista era. At the time, the glassy transparency felt futuristic and immersive. Fast-forward a few years, and it became shorthand for bloat and bad taste. But now, Apple is reintroducing similar ideas with Liquid Glass; and this time, it got the general public divided - some say it looks sleek and forward-thinking, others think its backward and poorly implemented.&lt;/p&gt;




&lt;h2&gt;
  
  
  UX as Fashion and Language
&lt;/h2&gt;

&lt;p&gt;Design trends tend to shift like fashion. We move from textured realism to stark minimalism, from shadows and gloss to flat colors and grids—and now, back toward softness, personality, and depth.&lt;/p&gt;

&lt;p&gt;Apple’s early iPhone UI was full of &lt;strong&gt;skeuomorphism&lt;/strong&gt;—leather-bound calendars, metallic sliders, detailed shadows. It helped users understand unfamiliar digital metaphors. But as people became fluent in mobile interfaces, that realism became unnecessary. Flat design swept in, demanding clarity and simplicity. &lt;/p&gt;

&lt;p&gt;Now? We’re seeing a return of visual flair: soft gradients, dynamic layers, animated textures. Not quite skeuomorphic, but not entirely flat either. The pendulum is swinging back, but with more nuance this time.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“UX is like a fashion, and just like that, it’s a language you can learn.”&lt;br&gt;
&lt;em&gt;Fs0i (Reddit user)&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That idea resonated with me on different levels. We develop &lt;strong&gt;fluency in design languages&lt;/strong&gt; just like spoken ones. A visual style that once needed explanation becomes intuitive through repetition and exposure. Today’s “weird” is often just tomorrow’s “normal.”&lt;/p&gt;




&lt;h2&gt;
  
  
  Not Wrong—Just Too Early
&lt;/h2&gt;

&lt;p&gt;The idea that &lt;strong&gt;a design isn’t necessarily incorrect - it might just be early&lt;/strong&gt; is a fact I think most people will side with. Timing matters as much as execution. Some ideas fail not because they lack merit, but because the &lt;strong&gt;infrastructure, audience readiness, or cultural context&lt;/strong&gt; hasn’t caught up yet.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Aero, though beautiful, was too heavy for its time: the amount of hardware resource this OS demanded from users was outrageous, yet makes sense. Now, our devices are better suited to render these intensive visual effects.&lt;/li&gt;
&lt;li&gt;Google Glass was awkward in 2013. Now, we’re exploring spatial interfaces and heads-up displays with excitement.&lt;/li&gt;
&lt;li&gt;Neumorphism was briefly mocked—but refined variants of it are quietly shaping modern UI kits.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Design leaders often introduce concepts that feel &lt;strong&gt;alien at first&lt;/strong&gt;, but gradually become convention. It takes courage to &lt;strong&gt;stick with a bold vision&lt;/strong&gt;, especially when early reactions are mixed. But this is often how the next generation of design is born.&lt;/p&gt;




&lt;h2&gt;
  
  
  Execution Is Everything
&lt;/h2&gt;

&lt;p&gt;There are countless ways to botch design and make it look gaudy, but Apple, as we know, usually finds the most elegant solution (except Siri and Apple Intelligence 😅).&lt;/p&gt;

&lt;p&gt;Many companies copy visual trends without understanding the principles behind them. They replicate the surface, not the &lt;strong&gt;intent&lt;/strong&gt;. That’s how we end up with flat designs that feel sterile to the application, or neumorphic buttons that fail accessibility tests.&lt;/p&gt;

&lt;p&gt;It’s not just &lt;strong&gt;what&lt;/strong&gt; you implement, but &lt;strong&gt;how well&lt;/strong&gt; you do it—and &lt;strong&gt;why&lt;/strong&gt; you’re doing it in the first place.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Cycle Keeps Turning
&lt;/h2&gt;

&lt;p&gt;Design is not a straight line toward some final form of perfection. It’s a cycle of exploration, rejection, refinement, and return. By recognizing these patterns, we can view trends more clearly—not as definitive steps forward, but as parts of a larger conversation.&lt;/p&gt;

&lt;p&gt;Some styles fade because they’re gimmicks. Others reemerge stronger because they were simply ahead of their time.&lt;/p&gt;

&lt;p&gt;So when you find yourself drawn to a bold or unconventional design idea, don’t immediately discard it just because it doesn’t “fit” current trends. Ask yourself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Is this idea wrong? Or just early?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Is the problem in the concept, or in its execution?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Could this become intuitive, once people are ready for it?&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sometimes, the best design decisions aren’t the ones that win immediate praise; they’re the ones that plant seeds for what comes next.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;You might not have been wrong. You might just have been early.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
And that distinction could be the difference between fading out and defining the future.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>ui</category>
      <category>ux</category>
      <category>frontend</category>
      <category>design</category>
    </item>
    <item>
      <title>Transactional Work: The Decline of Transformational Work</title>
      <dc:creator>Alexander Selorm Kubi</dc:creator>
      <pubDate>Tue, 22 Oct 2024 23:58:21 +0000</pubDate>
      <link>https://dev.to/xanderselorm/-transformational-vs-transactional-work-the-decline-of-transformational-work-561o</link>
      <guid>https://dev.to/xanderselorm/-transformational-vs-transactional-work-the-decline-of-transformational-work-561o</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;The modern workplace faces a critical divide between transactional work (routine, mechanical) and transformational work (creative, impactful). This divide represents more than just different approaches to work; it embodies a fundamental shift in how we create value in the 21st century.&lt;/p&gt;

&lt;h2&gt;
  
  
  Transformational Work Characteristics
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Long-term Impact&lt;/strong&gt;: Creates enduring change, like the iPhone revolutionizing human-technology interaction&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Innovation&lt;/strong&gt;: Breaks new ground and questions assumptions rather than iterating&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Personal Growth&lt;/strong&gt;: Pushes creators beyond comfort zones while building new capabilities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Emotional Resonance&lt;/strong&gt;: Creates memorable experiences and deep user connections&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quality Focus&lt;/strong&gt;: Demonstrates unwavering commitment to excellence&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Transactional Work Characteristics
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Short-term Focus&lt;/strong&gt;: Prioritizes quick wins over lasting impact&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Routine Nature&lt;/strong&gt;: Follows templates with minimal deviation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rushed Execution&lt;/strong&gt;: Often skips crucial planning and research&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Limited Investment&lt;/strong&gt;: Focuses on deliverables rather than outcomes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quantity Over Quality&lt;/strong&gt;: Emphasizes output metrics over value&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key Challenges
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Business Pressures&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quarterly results focus&lt;/li&gt;
&lt;li&gt;Risk-averse decision making&lt;/li&gt;
&lt;li&gt;Short-term performance metrics&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Technology Impact&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Over-reliance on automation&lt;/li&gt;
&lt;li&gt;Standardization of creative processes&lt;/li&gt;
&lt;li&gt;Skill erosion&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Workplace Changes&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gig economy fragmentation&lt;/li&gt;
&lt;li&gt;Decreased tolerance for iteration&lt;/li&gt;
&lt;li&gt;Meeting culture replacing deep work&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Solutions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  For Organizations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Create dedicated innovation spaces&lt;/li&gt;
&lt;li&gt;Implement balanced performance metrics&lt;/li&gt;
&lt;li&gt;Support long-term capability building&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  For Individuals
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Seek opportunities for meaningful impact&lt;/li&gt;
&lt;li&gt;Invest in deep expertise development&lt;/li&gt;
&lt;li&gt;Resist purely transactional approaches&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Moving Forward
&lt;/h2&gt;

&lt;p&gt;Success in the 21st century requires balancing efficiency with innovation. Organizations must create cultures that value both quick execution and transformational impact, while individuals must actively pursue opportunities for meaningful work that creates lasting value.&lt;/p&gt;

</description>
      <category>workplace</category>
      <category>career</category>
      <category>leadership</category>
      <category>learning</category>
    </item>
    <item>
      <title>Deploying Next.js to Your Local IP Address with Dynamic Port Assignment for Network Access</title>
      <dc:creator>Alexander Selorm Kubi</dc:creator>
      <pubDate>Thu, 27 Jun 2024 02:13:28 +0000</pubDate>
      <link>https://dev.to/xanderselorm/how-to-dynamically-assign-ports-and-access-your-nextjs-app-across-the-network-3p57</link>
      <guid>https://dev.to/xanderselorm/how-to-dynamically-assign-ports-and-access-your-nextjs-app-across-the-network-3p57</guid>
      <description>&lt;p&gt;Ever tried to start your JS/TS development server and wanted to access your dev server from another device but didn't know how? Well, here's a solution! &lt;/p&gt;

&lt;p&gt;This short tutorial will show you how to dynamically find an available port, display the network IP, and allow access to your server from different devices on your network. Let's get started!&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Install the Required Package
&lt;/h3&gt;

&lt;p&gt;First, we need a magical tool to help us out. Meet &lt;code&gt;get-port&lt;/code&gt; — your new best friend in port management 😃.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn add get-port
or
npm &lt;span class="nb"&gt;install &lt;/span&gt;get-port
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Create a Script to Find Available Ports
&lt;/h3&gt;

&lt;p&gt;Next, we’ll create a script that finds an available port and displays the network IP address.&lt;/p&gt;

&lt;h4&gt;
  
  
  Create &lt;code&gt;start-dev.mjs&lt;/code&gt; file
&lt;/h4&gt;

&lt;p&gt;Create a file named &lt;code&gt;start-dev.mjs&lt;/code&gt; with the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;execSync&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;child_process&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;getPort&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;get-port&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Get the network IP address of the machine&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ip&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;execSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ipconfig getifaddr en0&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="c1"&gt;// Function to find an available port within a range&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getAvailablePort&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;end&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;portsInUse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
      &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nx"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;availablePort&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getPort&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
          &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;availablePort&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;portsInUse&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
          &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nx"&gt;portsInUse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
         &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`No available ports found in range &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;-&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;end&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="c1"&gt;// Get an available port in the range 3000-3100&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;portsInUse&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getAvailablePort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;portsInUse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`🚧 Ports in use: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;portsInUse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;, &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Starting server at http://&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;ip&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Set environment variables&lt;/span&gt;
    &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;HOST&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ip&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Start the Next.js development server&lt;/span&gt;
    &lt;span class="nf"&gt;execSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`next dev -H &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;ip&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; -p &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;stdio&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;inherit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;HOST&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ip&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Failed to start development server:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;})();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Update Your &lt;code&gt;package.json&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Now, let's update your &lt;code&gt;package.json&lt;/code&gt; to use the new script.&lt;/p&gt;

&lt;h4&gt;
  
  
  Modify &lt;code&gt;package.json&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;Add the following script to your &lt;code&gt;package.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"dev"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"node --experimental-modules start-dev.mjs"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Explanation of the Scripts
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;start-dev.mjs&lt;/code&gt; Script&lt;/strong&gt;: This script handles finding an available port, setting the necessary environment variables, and starting the Next.js development server.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 4: Running Your Development Server
&lt;/h3&gt;

&lt;p&gt;Now, fire up your terminal and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn dev 
or
npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What Happens When You Run &lt;code&gt;yarn dev&lt;/code&gt; or &lt;code&gt;npm run dev&lt;/code&gt;?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Finding the IP Address&lt;/strong&gt;: The script retrieves your machine's IP address with the &lt;code&gt;ipconfig getifaddr en0&lt;/code&gt; command.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checking for Available Ports&lt;/strong&gt;: The script checks for available ports within the range 3000-3100.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Displaying Ports in Use&lt;/strong&gt;: If any ports are already taken, the script logs them to the console.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Setting Environment Variables&lt;/strong&gt;: The script sets the &lt;code&gt;HOST&lt;/code&gt; and &lt;code&gt;PORT&lt;/code&gt; environment variables for the development server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Starting the Server&lt;/strong&gt;: The script starts the development server on the available port and logs the network IP and port to the console.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Accessing the Server from Other Devices
&lt;/h3&gt;

&lt;p&gt;Once the server is running, you can access it from other devices on the same network using the network IP and port displayed in the console. For example, if the console logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Starting server at http://192.168.1.10:3001
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can access the server from another device on the same network by entering &lt;code&gt;http://192.168.1.10:3001&lt;/code&gt; in your browser's address bar.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;With this setup, you'll be able to access your development server from any device on your network. This makes it easy to test your application on multiple devices.&lt;/p&gt;

&lt;p&gt;Happy coding! 🧙‍♂️✨&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>The State of User Interfaces: A Frontend Developer's Perspective</title>
      <dc:creator>Alexander Selorm Kubi</dc:creator>
      <pubDate>Sun, 09 Apr 2023 10:53:10 +0000</pubDate>
      <link>https://dev.to/xanderselorm/the-state-of-user-interfaces-a-frontend-developers-perspective-119e</link>
      <guid>https://dev.to/xanderselorm/the-state-of-user-interfaces-a-frontend-developers-perspective-119e</guid>
      <description>&lt;p&gt;User interfaces (UIs) are the means through which humans interact with digital products, and as such, they must be designed to cater to human input. However, the current state of UIs is far from ideal, and it's only getting worse with the advent of artificial intelligence (AI). In this post, we'll explore some of the issues plaguing UIs and how they can be improved.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with UI Design
&lt;/h2&gt;

&lt;p&gt;The problem with UI design is that it's often done by experts who don't bother to ask users what they want. As a result, we get UIs that are difficult to use, buried in menus and lacking in accessibility. Furthermore, the current trend towards minimalism has only made things worse, with excessive negative space and a love of circular design elements.&lt;/p&gt;

&lt;p&gt;Take Facebook, for example. The social media giant has iteratively "simplified" its interface, resulting in buried options and an overly simplified newsfeed. Moreover, the font size is so large that it's reminiscent of a kindergarten classroom, and everything is bubbly and rounded to avoid sharp edges. Instagram, on the other hand, is stuck in the 90s tables logic, with tiny pictures and no zoom function.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Front-end Development
&lt;/h2&gt;

&lt;p&gt;Front-end development has expanded in recent years, but it hasn't solved any problems. Instead, it has added more skills to the required learning stack. While HTML/CSS and front-end frameworks have steadily advanced over the years, UIs have not kept up. Instead of building UIs that are better, more accessible, and more usable, we get "lowest common denominator" UIs that aim for simplicity but achieve only frustration.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Mobile Apps
&lt;/h2&gt;

&lt;p&gt;Mobile apps are another problem area, with numerous clicks required to do even the simplest of tasks. This is a consequence of bad design and lazy development. Many mobile apps are simply repackaged web interfaces, resulting in poor performance and frustrated users.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Need for Human Input
&lt;/h2&gt;

&lt;p&gt;AI can only guess what users want, but UIs are designed for humans, and therefore must be tested on humans. We need to move away from the current trend of expert-driven UI design and towards a more user-centered approach. UI designers must be willing to ask users what they want and then design UIs that cater to those desires.&lt;/p&gt;

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

&lt;p&gt;In conclusion, the current state of UIs is a sorry one. UIs are buried in menus, lacking in accessibility, and frustrating to use. Front-end development hasn't solved any problems, and mobile apps are often poorly designed and frustrating for users. We need to move away from the current trend of expert-driven UI design and towards a more user-centered approach. Only then can we hope to build UIs that are better, more accessible, and more usable.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>ui</category>
      <category>ux</category>
      <category>design</category>
    </item>
    <item>
      <title>Should I learn ReactJS in 2023?</title>
      <dc:creator>Alexander Selorm Kubi</dc:creator>
      <pubDate>Thu, 02 Feb 2023 00:35:27 +0000</pubDate>
      <link>https://dev.to/xanderselorm/should-i-learn-reactjs-1pof</link>
      <guid>https://dev.to/xanderselorm/should-i-learn-reactjs-1pof</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;My takes on how being a frontend (React.JS) developer feels like, so far.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fadnyde2ylk27wxqxwbdm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fadnyde2ylk27wxqxwbdm.jpg" alt="React Code" width="640" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a frontend developer, ReactJS gave me the power to bring creative ideas to life and shape the way people interact with technology. The journey of a frontend React developer is not only challenging, but also incredibly rewarding, if you do it right. &lt;/p&gt;

&lt;p&gt;With ReactJS, you have the unique opportunity to create dynamic, user-friendly, and visually appealing web applications the easiest way possible. &lt;/p&gt;

&lt;p&gt;One of the biggest advantages of working with React is its versatility. You can use React to build everything from simple static websites to complex web applications, and you can develop for multiple platforms, including web, mobile, and desktop. This gives you the opportunity to work on a wide range of projects, and the flexibility to adapt to the ever-changing needs of the industry.&lt;/p&gt;

&lt;p&gt;React is also a constantly evolving technology, which means that you'll never run out of things to learn. The React community is also incredibly supportive, with a wealth of resources, tutorials, and forums that can help you grow as a developer.&lt;/p&gt;

&lt;p&gt;Also, having TypeScript under your belt as a react developer makes you feel like you literally have wings. Typescript is like RedBull to react. Hehe. All the same, this shouldn't discourage you from still going ahead with the good old JavaScript.&lt;/p&gt;

&lt;p&gt;Being able to write React is a highly in-demand skill, and there are numerous opportunities to advance your career. Whether you're looking to take on more responsibility, explore new technologies, or simply earn a higher salary, there's no shortage of opportunities available.&lt;/p&gt;

&lt;p&gt;In conclusion, being a React developer is a rewarding and exciting career choice. With the constant evolution of technology, the supportive community, the ability to work on projects that align with your values, and the flexibility and financial rewards, there's never been a better time to become a frontend React developer. So, if you're interested in technology and have a passion for building great user experiences, consider making React development your next career move! Embrace your journey as a React developer and enjoy the ride!!&lt;/p&gt;

&lt;p&gt;Cheers!!!&lt;/p&gt;

</description>
      <category>cryptocurrency</category>
      <category>crypto</category>
      <category>blockchain</category>
      <category>offers</category>
    </item>
    <item>
      <title>Using React.JS as a Micro Frontend in Blazor WASM</title>
      <dc:creator>Alexander Selorm Kubi</dc:creator>
      <pubDate>Fri, 28 Jan 2022 20:23:11 +0000</pubDate>
      <link>https://dev.to/xanderselorm/using-reactjs-as-a-micro-frontend-in-blazor-wasm-1g76</link>
      <guid>https://dev.to/xanderselorm/using-reactjs-as-a-micro-frontend-in-blazor-wasm-1g76</guid>
      <description>&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Disclaimer&lt;/li&gt;
&lt;li&gt;Configuring the Projects&lt;/li&gt;
&lt;li&gt;Integrating the Micro Frontends into the App Shell/Startup Application&lt;/li&gt;
&lt;li&gt;Automating the Build Scripts&lt;/li&gt;
&lt;li&gt;Installing and Setting Up React.JS&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;Here is a link to the github repository. Feel free to clone, download or fork and make PRs.&lt;br&gt;
&lt;a href="https://github.com/XanderSelorm/MicroFrontendsExample" rel="noopener noreferrer"&gt;https://github.com/XanderSelorm/MicroFrontendsExample&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Disclaimer &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Kindly note that this tutorial is for educational purposes only and that this set up or architecture has not been tested in a production environment yet.&lt;/p&gt;

&lt;p&gt;In our &lt;a href="https://dev.to/xanderselorm/implementing-micro-frontends-using-net-blazor-wasm-55bl"&gt;previous part&lt;/a&gt; of this series, we looked setting up the environment and folder structure for the Micro Frontends.&lt;/p&gt;
&lt;h2&gt;
  
  
  Configuring the Projects &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;h3&gt;
  
  
  ReactMicroFrontend Project
&lt;/h3&gt;

&lt;p&gt;Since the &lt;code&gt;ReactMicroFrontend&lt;/code&gt; is basically a JavaScript project, NPM will obviously be used as the default package manager.&lt;/p&gt;

&lt;p&gt;To initialize NPM in the &lt;code&gt;ReactMicroFrontend&lt;/code&gt;, using the terminal, ensure that you are in the root directory and you have Node.js and NPM installed globally on your computer. If not, download it from &lt;a href="https://nodejs.org/en/download/" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Then continue by running the following command in the root directory of the project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;npm&lt;/span&gt; &lt;span class="k"&gt;init&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since this project is for tutorials purposes only, we'll keep the default values when initializing NPM here.&lt;/p&gt;

&lt;p&gt;With that done, let's look at how to bundle out JavaScript codes.&lt;br&gt;
 Since we're setting up the React Library manually, let's decide on what our bundler will be. For the sake of this tutorial, ‘Parcel’  will be used instead of usual webpack for the bundling of the React application.&lt;/p&gt;

&lt;p&gt;Now that we have npm installed and initialized in our project, let's use it to install Parcel. If you want to know more about &lt;code&gt;Parcel&lt;/code&gt;, &lt;a href="https://parceljs.org/docs/" rel="noopener noreferrer"&gt;check it out&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Run the following command in the root directory of the MicroFrontend (React) project in question:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;npm&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="n"&gt;parcel&lt;/span&gt; &lt;span class="p"&gt;--&lt;/span&gt;&lt;span class="n"&gt;save&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that this is done, let's determine where our React code will be bundled to upon build.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the &lt;code&gt;package.json&lt;/code&gt; file in the &lt;code&gt;ReactMicroFrontend&lt;/code&gt; project and modify the following lines:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;//destination&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;path&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"main"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"wwwroot/dist/app.js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;

  &lt;/span&gt;&lt;span class="err"&gt;//origin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;path&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"src/index.jsx"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;

  &lt;/span&gt;&lt;span class="err"&gt;//scripts&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"parcel build src/index.js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"clean"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"del-cli wwwroot/dist/* node_modules"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you take a critical look at our &lt;code&gt;clean&lt;/code&gt; script, you'd realize the use of a package called &lt;code&gt;del-cli&lt;/code&gt;. This package is used for permanently deleting files and directories. This packages needs to be installed globally before it can be used.&lt;br&gt;
Run the following command in your terminal to install it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;npm&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="p"&gt;--&lt;/span&gt;&lt;span class="k"&gt;global&lt;/span&gt; &lt;span class="n"&gt;del&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;cli&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  MicroFrontendExample.Shell Project
&lt;/h3&gt;

&lt;p&gt;Awesome! With that done, save the file and let's look at how to make sure our JavaScript code from our MicroFrontend is also bundled into the App Shell/Container App.&lt;br&gt;
To do this, we'll have to go back into the directory of our App Shell/Container App and then run a few commands.&lt;/p&gt;

&lt;p&gt;In the startup application, ‘Webpack’ will be used to bundle all the JavaScript frameworks together into the main application/App Shell. And since we'll be using NPM here too, we'll initialize NPM in this directory too and then install the Webpack. Use the following commands by running them in the root directory of the startup project/App Shell:&lt;/p&gt;

&lt;p&gt;Don't forget to keep the default values for NPM. (Well, you can still go ahead and customize it if you wish)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;npm&lt;/span&gt; &lt;span class="k"&gt;init&lt;/span&gt; &lt;span class="p"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;npm&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="n"&gt;webpack&lt;/span&gt; &lt;span class="p"&gt;--&lt;/span&gt;&lt;span class="n"&gt;save&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt; &lt;span class="p"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;npm&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;D&lt;/span&gt; &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;loader&lt;/span&gt; &lt;span class="p"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;npm&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="p"&gt;--&lt;/span&gt;&lt;span class="n"&gt;save&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt; &lt;span class="n"&gt;webpack&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;cli&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the above commands fail, run them one after the other, like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;npm&lt;/span&gt; &lt;span class="k"&gt;init&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;npm&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="n"&gt;webpack&lt;/span&gt; &lt;span class="p"&gt;--&lt;/span&gt;&lt;span class="n"&gt;save&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;npm&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="p"&gt;--&lt;/span&gt;&lt;span class="n"&gt;save&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt; &lt;span class="n"&gt;webpack&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;cli&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...and then&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;npm&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;D&lt;/span&gt; &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;loader&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Integrating the Micro Frontends into the App Shell/Startup Application &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;In the Startup Project’s ‘App.razor’ file, we'll load the entry-files of the class libraries (micro frontends) as assemblies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do this by adding the following lines of code to the &lt;code&gt;App.razor&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;@using&lt;/span&gt; &lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Reflection&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;!--&lt;/span&gt; &lt;span class="n"&gt;Default&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;Content&lt;/span&gt; &lt;span class="p"&gt;--&amp;gt;&lt;/span&gt;

&lt;span class="n"&gt;@code&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Assembly&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;LoadedAssemblies&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Assembly&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;typeof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ReactMicroFrontend&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;App&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;Assembly&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In the same file, on the &lt;code&gt;&amp;lt;Router&amp;gt;&lt;/code&gt; tag, add the &lt;code&gt;AdditionalAssemblies&lt;/code&gt; attribute and assign the &lt;code&gt;LoadedAssemblies&lt;/code&gt; value to it.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- AdditionalAssemblies="@LoadedAssemblies" --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;Router&lt;/span&gt; &lt;span class="na"&gt;AppAssembly=&lt;/span&gt;&lt;span class="s"&gt;"@typeof(Program).Assembly"&lt;/span&gt; &lt;span class="na"&gt;AdditionalAssemblies=&lt;/span&gt;&lt;span class="s"&gt;"@LoadedAssemblies"&lt;/span&gt; &lt;span class="na"&gt;PreferExactMatches=&lt;/span&gt;&lt;span class="s"&gt;"@true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In the Startup Project’s &lt;code&gt;_Import.razor&lt;/code&gt; file, add the namespaces of the various micro frontend applications in order to make them available throughout the startup project:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;@using&lt;/span&gt; &lt;span class="n"&gt;ReactMicroFrontend&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Awesome! A couple of things more to do...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Let's begin by modifying the &lt;code&gt;package.json&lt;/code&gt; file over here too. we'll add the &lt;code&gt;build&lt;/code&gt; and &lt;code&gt;clean&lt;/code&gt; scripts to the &lt;code&gt;scripts&lt;/code&gt; object.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"test"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"echo &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;Error: no test specified&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; &amp;amp;&amp;amp; exit 1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"webpack"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"clean"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"del-cli wwwroot/dist/* node_modules"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's add the configurations for &lt;code&gt;webpack&lt;/code&gt;. We'll do this by adding a new file and name it as &lt;code&gt;webpack.config.js&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Right click on the project &amp;gt; Add &amp;gt; New item &amp;gt; Javascript File.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Change the name to &lt;code&gt;webpack.config.js&lt;/code&gt;, and click Add.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdxsuo243ilqumjnrosu9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdxsuo243ilqumjnrosu9.png" alt="Adding JS File" width="800" height="555"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the &lt;code&gt;webpack.config.js&lt;/code&gt; file, add the following block of code, customize it if the need be, and save it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;path&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fs&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;get-react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readdirSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../ReactMicroFrontend/wwwroot/dist/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;f&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;endsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;f&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;`../ReactMicroFrontend/wwwroot/dist/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;devtool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;source-map&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;development&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;app.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;__dirname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./wwwroot/dist/react/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;module&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;test&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\.&lt;/span&gt;&lt;span class="sr"&gt;js$/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;enforce&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pre&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;use&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;source-map-loader&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Finally, let's make sure that our React script is added to our &lt;code&gt;index.html&lt;/code&gt; file. If not, before the closing &lt;code&gt;body&lt;/code&gt; tag in the &lt;code&gt;index.html&lt;/code&gt; file, add:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"dist/react/app.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Automating the Build Scripts &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;If you've read up to this point, congratulations! This is the last step and then we'll take out app for a test ride 😀!&lt;/p&gt;

&lt;p&gt;By now, I'm sure you are wondering whether we'll be calling the build scripts manually for each project? The answer? Hell no! 😀 We'll automate that too. So that when the build command is called for the dotnet projects, that of our JavaScript microfrontends are called too.&lt;/p&gt;

&lt;p&gt;Let's look at how to implement that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We'll edit the project files of both the &lt;code&gt;MicroFrontendExample.Shell&lt;/code&gt; and any of our microfrontend which uses JavaScript code; this includes out &lt;code&gt;ReactMicroFrontend&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're using VS Code, it's easy to locate the project files. &lt;/p&gt;

&lt;p&gt;But when you're using Visual Studio, right click on the project &amp;gt; Edit Project File.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Before the &lt;code&gt;&amp;lt;/Project&amp;gt;&lt;/code&gt; closing tag, add the following block of code:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;Target&lt;/span&gt; &lt;span class="na"&gt;Name=&lt;/span&gt;&lt;span class="s"&gt;"npm restore"&lt;/span&gt; &lt;span class="na"&gt;BeforeTargets=&lt;/span&gt;&lt;span class="s"&gt;"BeforeBuild"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;Exec&lt;/span&gt; &lt;span class="na"&gt;Command=&lt;/span&gt;&lt;span class="s"&gt;"npm install"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/Target&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;Target&lt;/span&gt; &lt;span class="na"&gt;Name=&lt;/span&gt;&lt;span class="s"&gt;"webpack"&lt;/span&gt; &lt;span class="na"&gt;AfterTargets=&lt;/span&gt;&lt;span class="s"&gt;"Build"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;Exec&lt;/span&gt; &lt;span class="na"&gt;Command=&lt;/span&gt;&lt;span class="s"&gt;"npm run build"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/Target&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;Target&lt;/span&gt; &lt;span class="na"&gt;Name=&lt;/span&gt;&lt;span class="s"&gt;"webpack clean"&lt;/span&gt; &lt;span class="na"&gt;AfterTargets=&lt;/span&gt;&lt;span class="s"&gt;"Clean"&lt;/span&gt; &lt;span class="na"&gt;Condition=&lt;/span&gt;&lt;span class="s"&gt;"Exists('node_modules')"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;Exec&lt;/span&gt; &lt;span class="na"&gt;Command=&lt;/span&gt;&lt;span class="s"&gt;"npm run clean"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/Target&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Awesome! Congratulations for making it up to this point! Now we're free to build our application. :D &lt;/p&gt;

&lt;p&gt;Ooopss!! There are Errors!?? Chill bro, 😀, this error was expected. 😊&lt;br&gt;
This error occurred because we directed the &lt;code&gt;Parcel&lt;/code&gt; bundler to an &lt;code&gt;index.js&lt;/code&gt; file which doesn't exist. This is because we haven't installed and set up our React.JS yet. &lt;/p&gt;

&lt;p&gt;This brings us to our next and final topic:&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing and Setting Up React.JS &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;This final step should be fairly easy to do. We'll run a couple of commands, run a few lines of code and then we call it one hell of a guide! 😀&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To begin, let's install react and react-dom. Run the following command in your terminal:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;npm&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="p"&gt;--&lt;/span&gt;&lt;span class="n"&gt;save&lt;/span&gt; &lt;span class="n"&gt;react&lt;/span&gt; &lt;span class="n"&gt;react&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;dom&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Secondly, let's create a new file, name it &lt;code&gt;index.js&lt;/code&gt; in the &lt;code&gt;src&lt;/code&gt; folder.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the following code block to the new file you created:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&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;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;ReactDOM&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;react-dom&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;renderApp&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;domElement&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-app&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#react-app&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;domElement&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;ReactDOM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;render&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;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Hello&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="err"&gt;🌐&lt;/span&gt;&lt;span class="o"&gt;!&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h1&amp;gt;, domElement&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="err"&gt;;
&lt;/span&gt;  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Finally, feel free to run the application, navigate to "/ReactMicroFrontend",  and experience the power of Blazor!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your final app should look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fajbciak4txuwh7egr0cu.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fajbciak4txuwh7egr0cu.gif" alt="Final Cut" width="956" height="594"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Here is a link to the github repository. Feel free to clone, download or fork and make PRs.&lt;br&gt;
&lt;a href="https://github.com/XanderSelorm/MicroFrontendsExample" rel="noopener noreferrer"&gt;https://github.com/XanderSelorm/MicroFrontendsExample&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you very much for reading. Follow me for more interesting guides and content. And oh, don't forget to leave a reaction 😉. I'll be grateful 😊 &lt;/p&gt;

&lt;p&gt;See you later, cheers!&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>microfrontend</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>Implementing Micro Frontends using .NET Blazor WASM</title>
      <dc:creator>Alexander Selorm Kubi</dc:creator>
      <pubDate>Sat, 11 Dec 2021 15:47:57 +0000</pubDate>
      <link>https://dev.to/xanderselorm/implementing-micro-frontends-using-net-blazor-wasm-55bl</link>
      <guid>https://dev.to/xanderselorm/implementing-micro-frontends-using-net-blazor-wasm-55bl</guid>
      <description>&lt;h2&gt;
  
  
  Preamble
&lt;/h2&gt;

&lt;p&gt;Below is a question from StackOverflow emphasizing the need for this article.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fstackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/65842239/combine-multiple-sites-with-my-blazor-net-5-application" rel="noopener noreferrer"&gt;
            Combine multiple sites with my Blazor.Net 5 application
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Jan 22 '21&lt;/span&gt;
            &lt;span&gt;Comments: 4&lt;/span&gt;
            &lt;span&gt;Answers: 1&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/65842239/combine-multiple-sites-with-my-blazor-net-5-application" rel="noopener noreferrer"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fstackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          1
        &lt;/div&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fstackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;We are in the process of building a Blazor.Net5 server application alongside a number of existing web projects (Blazor, Angular, html etc). We would like the Blazor application to be the only application the users go to and access the other sites from it.&lt;/p&gt;
&lt;p&gt;I wanted to create a Blazor…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/65842239/combine-multiple-sites-with-my-blazor-net-5-application" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Question&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Disclaimer&lt;/li&gt;
&lt;li&gt;To start with...&lt;/li&gt;
&lt;li&gt;Now, the main stuff&lt;/li&gt;
&lt;li&gt;Setting things up...&lt;/li&gt;
&lt;li&gt;Creating a friendly Folder Structure&lt;/li&gt;
&lt;li&gt;JavaScript Interop&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;Here is a link to the github repository. Feel free to clone, download or fork and make PRs.&lt;br&gt;
&lt;a href="https://github.com/XanderSelorm/MicroFrontendsExample" rel="noopener noreferrer"&gt;https://github.com/XanderSelorm/MicroFrontendsExample&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Disclaimer &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Kindly note that this tutorial is for educational purposes only and that this set up or architecture has not been tested in a production environment yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  To start with... &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Let's begin where every project begins! &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a new Blazor Web Assembly app.&lt;/li&gt;
&lt;li&gt;Name the Project as &lt;code&gt;MicroFrontendsExample.Shell&lt;/code&gt;.
Note that this particular project will serve as our app shell.&lt;/li&gt;
&lt;li&gt;Maintain the solution name as is: &lt;code&gt;MicroFrontendsExample&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;For this project, we'll use .NET5.0 as the targeted version.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Please note&lt;/strong&gt; that for this guide, I'll stick to using Visual Studio for the project set up.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa96ax0oidv1zpgckftg5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa96ax0oidv1zpgckftg5.png" alt="New Project" width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With our container app/app shell ready, let's begin adding the individual micro frontends.&lt;/p&gt;

&lt;h2&gt;
  
  
  Now, the main stuff &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Let's start with first adding micro frontends based on other JS frameworks. We'll start with &lt;strong&gt;React.js&lt;/strong&gt; due its popularity. Also, we'll be making use of one major feature of Blazor - JavaScript Interoperability (JsInterOp).&lt;/p&gt;

&lt;p&gt;To do this, let's add a new Class Library.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Right click on the solution &amp;gt; Add &amp;gt; New project &lt;/li&gt;
&lt;li&gt;Search for 'Razor Class library' and select it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Farp2zwh6lx1iad8jeebo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Farp2zwh6lx1iad8jeebo.png" alt="Add New Razor Class Library" width="800" height="520"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click 'Next'&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On the next screen, &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enter the name of the Class Library (&lt;code&gt;ReactMicroFrontend&lt;/code&gt; in our case) and click 'Next'&lt;/li&gt;
&lt;li&gt;Select .Net5.0 as the version&lt;/li&gt;
&lt;li&gt;Click on 'Create'&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Voila! That was easy, right?&lt;/p&gt;

&lt;p&gt;Now, onto the good stuff - Setting up the React Micro Frontend. Yay!🙏🏽&lt;/p&gt;

&lt;p&gt;Since we're working with Blazor, it basically means that we won't be making use of any &lt;code&gt;HTML&lt;/code&gt; - only &lt;code&gt;.razor&lt;/code&gt;. &lt;br&gt;
I know you're wondering "so where will React's entry point be?" Hold your horses!😀 "do not be afraid", I've got you 😎.&lt;/p&gt;

&lt;p&gt;We only need one Blazor component here which will call React's bundled file(s). Don't worry, you'll get what I mean along the line. 😉&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting things up... &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Firstly, let's add the &lt;code&gt;ReactMicroFrontend&lt;/code&gt; as a Project Reference to the main Blazor App. This will enable the container app or app shell recognize our class library as a part of itself (in layman's terms).&lt;/p&gt;

&lt;p&gt;Do this by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Right-clicking on the main Blazor project (&lt;code&gt;MicroFrontendsExample.Shell&lt;/code&gt;) &lt;/li&gt;
&lt;li&gt;Select &lt;code&gt;Add &amp;gt; Project Reference&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;In the pop-up window, check the various projects/class libraries that are meant to be your micro frontend applications (&lt;code&gt;ReactMicroFrontend&lt;/code&gt; in our case). &lt;/li&gt;
&lt;li&gt;Click OK.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With that being done, let's go ahead and do some more set up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a friendly Folder structure &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Let's have a look at how our Class library looks like so far.&lt;/p&gt;

&lt;p&gt;From the Solutions Explorer, this is what it looks like:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjf1tk6hbu1ewyxdllczb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjf1tk6hbu1ewyxdllczb.png" alt="React Micro Frontend" width="347" height="505"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we've seen how it looks like, let's start with some modifications to make it react friendly.&lt;/p&gt;

&lt;p&gt;Setting up a folder structure for your micro frontend is solely dependent on the preferences of the team involved (choice of architecture/principle).&lt;/p&gt;

&lt;p&gt;Let's do some easy stuff! Deleting and creating a couple of files and folders. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Let's delete the &lt;code&gt;ExampleJsInterop.cs&lt;/code&gt; file, and the &lt;code&gt;Component1.razor&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;In the &lt;code&gt;wwwroot&lt;/code&gt; folder, let's delete the &lt;code&gt;background.png&lt;/code&gt; and the &lt;code&gt;exampleJsInterop.js&lt;/code&gt; files too.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With all that done, we'll create one new file - the entry-point file (&lt;code&gt;App.razor&lt;/code&gt;) file.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Right click on the &lt;code&gt;ReactMicroFrontend&lt;/code&gt; &amp;gt; Add &amp;gt; New Item &amp;gt; Razor Component.&lt;/li&gt;
&lt;li&gt;Give your file a name at the bottom, and click 'Add'.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using the same method, let's create a folder called &lt;code&gt;src&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Right click on the &lt;code&gt;ReactMicroFrontend&lt;/code&gt; &amp;gt; Add &amp;gt; New Folder.&lt;/li&gt;
&lt;li&gt;Give your folder a name and click away.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Moving ahead...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Within the &lt;code&gt;wwwroot&lt;/code&gt; folder, create another folder called &lt;code&gt;dist&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's throw some more light on the reasons for these massive overhaulings :D &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbpnfhurubxn8sxfc0x3k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbpnfhurubxn8sxfc0x3k.png" alt="Folder Structure" width="251" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The &lt;code&gt;App.razor&lt;/code&gt; file is the entry point of the React Application. It is through this file that the react application is loaded onto the blazor wasm framework.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;code&gt;_imports.razor&lt;/code&gt; file contains any namespace we'd want available throughout the scope of the Class Library.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The ‘wwwroot’ folder contains a ‘dist’ folder where the bundled react app is placed after the react app is built with ‘npm run build’.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The ‘src’ folder is where the react application/codebase resides.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At this point, if you should run your app, you'll be greeted with the default boiler-plated pages from blazor:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fityb6798v2b6yta3s25b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fityb6798v2b6yta3s25b.png" alt="First App Run" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next and final thing to do for this part of the series is making sure that the JavaScript codes we'll be writing will be made available to our browser through what we call:&lt;/p&gt;

&lt;h2&gt;
  
  
  JavaScript Interop &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;In this topic, we'll have a look at how to configure the JavaScript interop in the &lt;code&gt;ReactMicroFrontend&lt;/code&gt; to allow us build the JavaScript together with the C#. If you want to read more about JavaScript InterOp in Blazor, &lt;a href="https://blazor-university.com/javascript-interop/" rel="noopener noreferrer"&gt;check it out here&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To begin, let's make some modification to our &lt;code&gt;App.razor&lt;/code&gt; file. Add the following block of code:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@page "/ReactMicroFrontend"

&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"react-app"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with an &lt;code&gt;id&lt;/code&gt; of &lt;code&gt;react-app&lt;/code&gt; serves as the main entry point of our javascript code. In other words, it is in this &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; tag that our javascript code will be rendered.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Secondly, lets add another file and name it &lt;code&gt;App.razor.cs&lt;/code&gt;. This file will serve as a code-behind file where we'll keep all the JavaScript InterOp logics.
After creating the file, open it and add the following block of code and customize it as the need be:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.AspNetCore.Components&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.JSInterop&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Collections.Generic&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Linq&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Text&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Threading.Tasks&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;ReactMicroFrontend&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;partial&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;App&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Inject&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;IJSRuntime&lt;/span&gt; &lt;span class="n"&gt;Jsr&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="k"&gt;protected&lt;/span&gt; &lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt; &lt;span class="nf"&gt;OnAfterRenderAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;firstRender&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;//renderJs here is the name of our&lt;/span&gt;
            &lt;span class="c1"&gt;//javascript function which will render our React app&lt;/span&gt;
            &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;Jsr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;InvokeVoidAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"renderJs"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;base&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;OnAfterRenderAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;firstRender&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...and that, my friends, is a good start!&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's take a break here
&lt;/h2&gt;

&lt;p&gt;In following parts of this series about Micro Frontends in .NET Blazor WASM, I'll delve deeper into the setting up of React.js in the new Class Library we created.&lt;/p&gt;

&lt;p&gt;Stay Tuned! Cheers!!!&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>blazor</category>
      <category>microfrontend</category>
      <category>react</category>
    </item>
    <item>
      <title>Introducing Micro Frontends in .NET Blazor WASM</title>
      <dc:creator>Alexander Selorm Kubi</dc:creator>
      <pubDate>Sat, 04 Dec 2021 22:48:23 +0000</pubDate>
      <link>https://dev.to/xanderselorm/introduction-to-micro-frontends-using-net-blazor-wasm-part-1-lc9</link>
      <guid>https://dev.to/xanderselorm/introduction-to-micro-frontends-using-net-blazor-wasm-part-1-lc9</guid>
      <description>&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What are Micro Frontends?&lt;/li&gt;
&lt;li&gt;Why Micro Frontends?&lt;/li&gt;
&lt;li&gt;Micro Frontends vs Monolithic Frontends&lt;/li&gt;
&lt;li&gt;A Detailed look at a Micro Frontend&lt;/li&gt;
&lt;li&gt;How a Micro Frontend Looks Like&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Blazor is fast becoming one of the most loved web development frameworks out there to both c# and non-c# developers due to its robustness and its reliance on the powerful c# language and the .NET framework as a whole.&lt;br&gt;
This makes building a scalable and secure web application (either client or server) a breeze to all who know how to program in c#.&lt;/p&gt;

&lt;p&gt;On top of this, it makes use of web assembly for its client-side application called Blazor Wasm. If you're new to Blazor and you'd like to read more on it, see: &lt;a href="https://blazor-university.com/overview/what-is-blazor/" rel="noopener noreferrer"&gt;What is Blazor?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, to the main subject...&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Micro Frontends? &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://micro-frontends.org/#what-are-micro-frontends" rel="noopener noreferrer"&gt;Micro Frontends&lt;/a&gt; can be defined as an architectural style where independently deliverable frontend applications are composed into a greater whole by teams. &lt;br&gt;
The basic idea is to extend the idea of microservices to the frontend development through which a system can be divided into teams that own end-to-end systems and independently deliver frontend applications to compose into a greater whole.&lt;/p&gt;

&lt;p&gt;Some of the key benefits that we've seen from micro frontends are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Small development scope,&lt;/li&gt;
&lt;li&gt;Smaller, more cohesive and maintainable codebases,&lt;/li&gt;
&lt;li&gt;More scalable organizations with decoupled, autonomous teams,&lt;/li&gt;
&lt;li&gt;The ability to upgrade, update, or even rewrite parts of the frontend in a more incremental fashion than was previously possible.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  But..., Why Micro Frontends? &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;The current trend of frontend development is to build a feature-rich and powerful browser application which sits on top of a micro service architecture. Over time the frontend layer, often developed by a separate team, grows into a Frontend Monolith, and this gets more difficult to maintain.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Good frontend development is hard. &lt;/li&gt;
&lt;li&gt;Scaling frontend development so that many teams can work simultaneously on a large and complex product is even harder. &lt;/li&gt;
&lt;li&gt;Implementing other languages or frameworks into your application? Don’t even think about it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are all real problems that can all negatively affect your ability to efficiently deliver high quality user experiences to your customers through your frontends.&lt;/p&gt;

&lt;h2&gt;
  
  
  Micro Frontends vs Monolithic Frontends &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Monolith Frontend with Microservices: &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fok6soca6kro611pkedu2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fok6soca6kro611pkedu2.png" alt="Microservices with Monolith Frontend" width="800" height="515"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Micro Frontend with Microservices: &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fglkor2e8rc9oaw4l9xmh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fglkor2e8rc9oaw4l9xmh.png" alt="Microservices with Monolith Frontend" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A Detailed look at a Micro Frontend &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Each Micro Frontend usually in a project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is run by a cross-functional team (from the UI/UX guy through the DevOps guy),&lt;/li&gt;
&lt;li&gt;Ships its own UI,&lt;/li&gt;
&lt;li&gt;Stores its own data,&lt;/li&gt;
&lt;li&gt;Has its own technology stack,&lt;/li&gt;
&lt;li&gt;Is assigned a particular task/feature/mission.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwaa7q4t7t9vnialsb8ze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwaa7q4t7t9vnialsb8ze.png" alt="In-depth look at Micro Frontends" width="800" height="559"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How a Micro Frontend Looks Like? &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;There are many approaches that could reasonably be called micro frontends, and there is a natural architecture that emerges across all these approaches. &lt;/p&gt;

&lt;p&gt;To start with, there is a single container application (app shell), which:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Renders common page elements such as headers and footers,&lt;/li&gt;
&lt;li&gt;Addresses cross-cutting concerns like authentication and navigation,&lt;/li&gt;
&lt;li&gt;Brings the various micro frontend components together onto a page and tells each micro frontend when and where to render itself.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fra5srxlbxah8od00dyqp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fra5srxlbxah8od00dyqp.png" alt="Implement the Micro Frontend" width="800" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  And that's it for today! &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;In following parts of this series about Micro Frontends in .NET Blazor WASM, I'll explore the implementation details, and how we can use other web development frameworks as a micro frontend, using .NET Blazor WASM as the App Shell/Container.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>blazor</category>
      <category>microfrontend</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
