<?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: Ren Hiyama</title>
    <description>The latest articles on DEV Community by Ren Hiyama (@renhiyama).</description>
    <link>https://dev.to/renhiyama</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%2F918116%2Fba4a3f99-9d44-496b-9218-e16ef80ee2f8.jpeg</url>
      <title>DEV Community: Ren Hiyama</title>
      <link>https://dev.to/renhiyama</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/renhiyama"/>
    <language>en</language>
    <item>
      <title>How to dualboot Hyprland with Gnome Desktops on Linux</title>
      <dc:creator>Ren Hiyama</dc:creator>
      <pubDate>Wed, 24 Jan 2024 07:30:43 +0000</pubDate>
      <link>https://dev.to/renhiyama/how-to-dualboot-hyprland-with-gnome-desktops-on-linux-1pa4</link>
      <guid>https://dev.to/renhiyama/how-to-dualboot-hyprland-with-gnome-desktops-on-linux-1pa4</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Linux desktops are like a box of chocolates - you never know what you’re going to get. One day, you’re working on a sleek and stylish desktop, and the next day, you’re staring at a screen that looks like it was designed in the 90s. But that’s the beauty of Linux - it’s unpredictable, quirky, and always keeps you on your toes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Personally, I find Gnome the most usable desktop. Things just works - it stays out of my way, and apps work together with harmony, without causing any issues. Want to login to Vscode with Github? Just click yes, and gnome will open your preffered default browser automatically, login to Github, close the tab, and switch back to vscode app and log you in successfully.&lt;/p&gt;

&lt;p&gt;However, sometimes I prefer Hyprland over Gnome. Maybe its because it looks cool, maybe you can customize it a lot, maybe it just has quality of life animations and customizable keybinds. But for me, its because Hyprland doesn't hook any keybind by default. And that includes the Win/Super key. It's just perfect for VM Guis and passing my inputs like the win key to open the windows start menu pretty easily, whereas Gnome would open its own overview panel when clicking the win key.&lt;/p&gt;

&lt;p&gt;So, without further ado - Start by having GNOME preconfigured/already installed and ready to use.&lt;br&gt;
I suggest using Fedora Workstation, it comes with Gnome desktop by default, unless you choose some other flavour.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;BTW, many suggest to use other login display managers like SDDM, but I didn't find any problems using the default GDM login manager that comes with GNOME desktop by default.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For illustration purposes, I will be running Fedora Default/Gnome flavour ISO inside a VM (but dont worry, I still use Fedora on the real setup too lol)&lt;/p&gt;

&lt;p&gt;So anyways, after setting up Gnome desktop properly, you should start by installing Hyprland package.&lt;br&gt;
On Fedora, its as easy as installing &lt;code&gt;sudo dnf install hyprland&lt;/code&gt; .&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%2Ftbj9zrubjraqhd31e17d.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%2Ftbj9zrubjraqhd31e17d.png" alt="Installing Hyprland on Fedora" width="800" height="708"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If everything goes perfect, you can log out to the login screen of GDM. Select your account if not already, and you will see a small "cog" icon at the bottom right. Clicking it will show available Desktops that you can use.&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%2Fqk9yfnl2d5jcgjnc0t69.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%2Fqk9yfnl2d5jcgjnc0t69.png" alt="Select Hyprland" width="800" height="708"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We now need to setup gnome polkit integration. Hyprland docs suggested kde integration, but since we want Gnome one, start by pressing &lt;code&gt;win+Q&lt;/code&gt; to open up kitty terminal. Type in &lt;code&gt;sudo dnf install polkit-gnome&lt;/code&gt; to do so. For other linux distros out there, consider finding a similar package by search online.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you are setting Hyprland for the first time, you will get a yellow warning popup at the top of the screen. To remove it, you need to install a code editor like &lt;code&gt;vim&lt;/code&gt;, edit the config file at &lt;code&gt;~/.config/hypr/hyprland.conf&lt;/code&gt; and remove the &lt;code&gt;autogenerated=1&lt;/code&gt; line.&lt;/p&gt;
&lt;/blockquote&gt;



&lt;p&gt;Now the hard part - We need to setup passwords to be synced with Gnome desktop too.&lt;/p&gt;

&lt;p&gt;If you had previously googled it, ArchWiki would say the binary was installed at &lt;code&gt;/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1&lt;/code&gt;, however that's not the case here in Fedora.&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%2Fqsitppmfxdrbzqxtxkzr.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%2Fqsitppmfxdrbzqxtxkzr.png" alt="ArchWiki Page" width="800" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I found out that Fedora installs the binary at &lt;code&gt;/usr/libexec/polkit-gnome-authentication-agent-1&lt;/code&gt; (Thank me later). So you can run that command, and then open another terminal to try whether Gnome will ask password now back - &lt;code&gt;win+Q&lt;/code&gt; to open another kitty terminal &amp;amp; type in &lt;code&gt;pkexec whoami&lt;/code&gt;&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%2Fmq168d3c9y1ee1wvlbzy.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%2Fmq168d3c9y1ee1wvlbzy.png" alt="Gnome Polkit Asking Password" width="800" height="708"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you provide the correct password, it will run the command as root user, and so it will return &lt;code&gt;root&lt;/code&gt; to the terminal ;p&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%2Ftbvsvmb9482a25e0rzsm.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%2Ftbvsvmb9482a25e0rzsm.png" alt="pkexec command ran successfully" width="800" height="708"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, now that we know that this polkit for gnome works successfully, we should write it to the hyprland config file to run this command everytime on logging into hyprland. To do so, open &lt;code&gt;~/.config/hypr/hyprland.conf&lt;/code&gt;.&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%2Fd38ws3vsthxegwdnnq4z.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%2Fd38ws3vsthxegwdnnq4z.png" alt="gnome polkit" width="800" height="708"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, save it and press &lt;code&gt;win+M&lt;/code&gt; to crash/stop Hyprland, which will take you back to GDM login screen. Login back to Hyprland, and open up the terminal and run back &lt;code&gt;pkexec whoami&lt;/code&gt; to find out that the Gnome UI like popup will ask the password back again - which confirms that Hyprland already ran that command which we asked it to.&lt;/p&gt;

&lt;p&gt;But, its not over...&lt;br&gt;
If you were already using your favorite browser on Gnome desktop before, I bet you logged into some of the sites. But if you try to open the same browser on Hyprland, you lose all your logged in passwords and such. Wonder why? It's because all those browsers and third party apps dont know what Hyprland environment is, and since they aren't inside gnome environment, they can use gnome password manager to login your online accounts. Wondering what's the solution? I did too. I searched all across the internet, and couldn't find any solution. However, I got a feeling that I should mess with the environment variables to check whether I can fake like as if I was in a Gnome environment - and to my suprise, I had succeeded!&lt;br&gt;
After looking into Hyprland docs back again, I found a small spoiler alert that Hyprland sets up some envs which says to every app that they're in Hyprland environment.&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%2F4vsp19jmz1hyf946y8x6.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%2F4vsp19jmz1hyf946y8x6.png" alt="oh well..." width="800" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;"however it is not a bad idea to set them explicitly" - oh wow... who knew the answer was put up like this?&lt;br&gt;
Since we are using Wayland on both the desktops, we don't need to change the 2nd option. However, we need to set the other two envs to fake the whole environment that we are in Gnome.&lt;/p&gt;

&lt;p&gt;Type in this to the &lt;code&gt;~/.config/hypr/hyprland.conf&lt;/code&gt; file, just on top/before any &lt;code&gt;exec-once&lt;/code&gt; statements, so any command ran will have these envs setup already:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="n"&gt;env&lt;/span&gt; = &lt;span class="n"&gt;XDG_CURRENT_DESKTOP&lt;/span&gt;,&lt;span class="n"&gt;GNOME&lt;/span&gt;
&lt;span class="n"&gt;env&lt;/span&gt; = &lt;span class="n"&gt;XDG_SESSION_DESKTOP&lt;/span&gt;,&lt;span class="n"&gt;gnome&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wondering where did I find these two variables? I just opened the terminal in Gnome desktop and echo'ed it back to me ;)&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%2Fz1g6w98qqsnknj7x61k2.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%2Fz1g6w98qqsnknj7x61k2.png" alt="gnome envs" width="227" height="111"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can run any applications now, and they will be synced &amp;amp; logged in on both the desktops! Congrats, you have your (soon to be) dream setup! Happy ricing your Hyprland!&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%2Fwoydudiilc1j6qm8w6nf.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%2Fwoydudiilc1j6qm8w6nf.png" alt="Never gonna..." width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
    </item>
    <item>
      <title>Make Dependency Management Better with URL Imports &amp; Ree.js!</title>
      <dc:creator>Ren Hiyama</dc:creator>
      <pubDate>Fri, 13 Oct 2023 09:40:35 +0000</pubDate>
      <link>https://dev.to/renhiyama/lets-optimize-dependency-management-with-url-imports-1401</link>
      <guid>https://dev.to/renhiyama/lets-optimize-dependency-management-with-url-imports-1401</guid>
      <description>&lt;h3&gt;
  
  
  How to use Ree.js and URL Imports in Node.js
&lt;/h3&gt;

&lt;p&gt;Ree.js is a library that makes web development faster and easier by providing features such as URL Imports, JSX support, and server-side rendering. URL Imports are a way of importing modules from URLs instead of local files or npm packages. This can reduce the download size and improve the performance of your web applications. Let's get cooler, shouldn't we?&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%2Fco87ovuntlr1xuaj5dtv.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%2Fco87ovuntlr1xuaj5dtv.gif" alt="we are cool bois" width="256" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Ree.js works on Bun too. If you find any problem, please make an issue on github. Feel free to use it over Nodejs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this blog post, I will show you how to use Ree.js and URL Imports in Node.js/Bun, and compare them with the traditional way of using npm packages.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are URL Imports?
&lt;/h2&gt;

&lt;p&gt;URL Imports are a feature that allows you to import modules from URLs instead of local files or npm packages. For example, instead of installing and importing the chalk module from npm, you can import it from a URL like this:&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="nx"&gt;chalk&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;https://esm.sh/chalk@5.3.0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This way, you don't need to declare any dependencies in package.json and wait for NPM to install &lt;strong&gt;every&lt;/strong&gt; dependency.&lt;/p&gt;

&lt;p&gt;URL Imports are supported by some modern JavaScript platforms, such as Deno and Skypack. However, Node.js does not support URL Imports natively yet (they recently added support for it, but it doesn't allow using native node APIs. That's where Ree.js' URL Imports comes into play)&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use Ree.js and URL Imports in Node.js?
&lt;/h2&gt;

&lt;p&gt;Ree.js is a library that makes web development faster and easier by providing features such as URL Imports, JSX/TSX/MDX support, and server-side rendering. Ree.js also supports importing modules from URLs without any experimental flags or hacks.&lt;/p&gt;

&lt;p&gt;To use Ree.js and URL Imports in Node.js, you need to do the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install &lt;code&gt;@reejs/imports&lt;/code&gt; from npm:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i @reejs/imports
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Import the Import function from reejs/import.js:
&lt;/li&gt;
&lt;/ol&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;Import&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;@reejs/imports&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Use the Import function to import modules from URLs:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;chalk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nc"&gt;Import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://esm.sh/chalk@5.3.0&lt;/span&gt;&lt;span class="dl"&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;chalk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;green&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;We Did It!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Import function returns a promise that resolves to the imported module. You need to use the await keyword to get the module. Consider using &lt;code&gt;Import&lt;/code&gt; instead of native dynamic &lt;code&gt;import&lt;/code&gt; function. Not only it adds additional support, but it also fixes the problems with importing &lt;code&gt;default&lt;/code&gt; property seperately (with &lt;code&gt;Import&lt;/code&gt;, default property works the same as static import statement).&lt;/p&gt;

&lt;p&gt;Alternatively, try out Ree.js &lt;code&gt;x&lt;/code&gt; mode!&lt;br&gt;
It adds support for transpiling files and running them directly, as well as Deno's static import syntax for resolving and using URL Imports. Make sure to run &lt;code&gt;npm i -g reejs&lt;/code&gt; to install globally first!&lt;/p&gt;

&lt;p&gt;Make a file like &lt;code&gt;index.ts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;chalk&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;https://esm.sh/chalk@5.3.0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;//Import function is globally available under our scope too!&lt;/span&gt;
&lt;span class="c1"&gt;//try using `let chalk = await Import("https://esm.sh/chalk@5.3.0");` and watch it work too!&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;chalk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;green&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;We Did It!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now run the file with &lt;code&gt;reejs x index.ts&lt;/code&gt;. It should work fine!&lt;/p&gt;

&lt;h2&gt;
  
  
  Why use Reejs and URL Imports over legacy NPM packages?
&lt;/h2&gt;

&lt;p&gt;There are some benefits of using Reejs and URL Imports over legacy NPM packages, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reduced download size: You don't need to download and install any dependencies or manage any package.json files. You only download the modules you need from URLs. Stop downloading those extra useless resources: README.mds, .gitignores &amp;amp; other files. Download what you actually need!&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%2Fiph2fpx9tj2pao5cjn8e.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%2Fiph2fpx9tj2pao5cjn8e.png" alt="node modules are way more bloated" width="800" height="575"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Improved performance: You don't need to resolve any local files or npm packages. You just fetch the modules from URLs and cache them for faster loading.&lt;/li&gt;
&lt;li&gt;Easier updates: You don't need to update any dependencies or package.json files. You just change the URL of the module you want to use, and Node.js will fetch the latest version for you.&lt;/li&gt;
&lt;li&gt;More compatibility: You can use modules that are compatible with other JavaScript platforms, such as Deno and Skypack. You don't need to worry about any compatibility issues or polyfills.&lt;/li&gt;
&lt;li&gt;Easily serve libraries from local server/private VPS: You can try to serve and cache libraries by running &lt;a href="https://github.com/esm-dev/esm.sh/blob/main/HOSTING.md" rel="noopener noreferrer"&gt;esm.sh&lt;/a&gt; to improve loading times on your server side. Or to keep things simple, just upload a code to pastebin or similar services and directly use it here!
&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%2Ffzjp6gal1vkkpnr718s1.gif" alt="keep things simple" width="160" height="210"&gt;
&lt;/li&gt;
&lt;li&gt;Optional dependency loading: If you have ever built a library for developers, chances are there is a dependency which is rarely meant to be used. Installing it straight away when someone installs your library means they're gonna waste extra time and storage. With Reejs, you can use conditional statements and dynamic imports to wait downloading them until required at the last moment. Reejs uses the same trick to keep the initial Reejs download size way small - it doesn't downloads typescript/jsx transpiler unless the one of the files are in &lt;code&gt;.ts&lt;/code&gt; or &lt;code&gt;.jsx&lt;/code&gt;. Get creative and bring down the download sizes of your clis!&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Reejs is a library that makes web development faster and easier by providing features such as URL Imports, JSX support, and server-side rendering. URL Imports are a way of importing modules from URLs instead of local files or npm packages. This can reduce the download size and improve the performance of your web applications.&lt;/p&gt;

&lt;p&gt;In this blog post, I showed you how to use reejs and URL Imports in Node.js &amp;amp; Bun, and compared them with the traditional way of using npm packages. I hope you found this blog post helpful and learned something new.&lt;/p&gt;

&lt;p&gt;If you want to learn more about reejs and URL Imports, you can check out our resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/rovelstars/reejs" rel="noopener noreferrer"&gt;GitHub - rovelstars/reejs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ree.js.org" rel="noopener noreferrer"&gt;Ree.js.org&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thank you for reading! Bye bye!&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%2Frbjkq5lnwk7cphyb90m4.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%2Frbjkq5lnwk7cphyb90m4.gif" alt="Pepe says bye" width="498" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>bunjs</category>
    </item>
    <item>
      <title>Welcome to the dark side. Ree.js awaits you!</title>
      <dc:creator>Ren Hiyama</dc:creator>
      <pubDate>Thu, 05 Oct 2023 08:32:16 +0000</pubDate>
      <link>https://dev.to/renhiyama/welcome-to-the-dark-side-reejs-awaits-you-1e4p</link>
      <guid>https://dev.to/renhiyama/welcome-to-the-dark-side-reejs-awaits-you-1e4p</guid>
      <description>&lt;p&gt;Do you have your old computer/laptop lying around? Or atleast your (not so new) phone nearby? Cause get ready, we are jumping in for the lightweight yet performant framework of all time!&lt;/p&gt;

&lt;p&gt;Meet Ree.js, a web framework for both the next generation and the &lt;strong&gt;older&lt;/strong&gt; generation of desktops and servers, where developing products and services for your clients could never have been faster!&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/rovelstars" rel="noopener noreferrer"&gt;
        rovelstars
      &lt;/a&gt; / &lt;a href="https://github.com/rovelstars/reejs" rel="noopener noreferrer"&gt;
        reejs
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Make Sites Faster, without the need of building anything!
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div&gt;
  &lt;a href="https://github.com/rovelstars/reejs//ree.js.org" rel="nofollow noopener noreferrer"&gt;
  &lt;img src="https://camo.githubusercontent.com/7c111727f5ce3cfa4c53301cfd8b2a0a7f065c3db6248396305be7ac5039d77b/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f73743864696a386174617538683862726e6168752e706e67" height="130px" width="331.5px" alt="Ree.js"&gt;
  &lt;/a&gt;
  &lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Finally the best of both worlds: Fast build times and a great developer experience 😎&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/77e2f7dd0e153886c460de2d8204070074e6f111ab8068393d614b8c16df8d18/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73706f6e736f72732f72656e686979616d613f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562"&gt;&lt;img alt="GitHub Sponsors" src="https://camo.githubusercontent.com/77e2f7dd0e153886c460de2d8204070074e6f111ab8068393d614b8c16df8d18/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73706f6e736f72732f72656e686979616d613f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/5bd058e244d4b450160c93072c5f504100602b743f5e5853e39cba142fb40b56/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;img alt="GitHub contributors" src="https://camo.githubusercontent.com/5bd058e244d4b450160c93072c5f504100602b743f5e5853e39cba142fb40b56/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/c515d02d79ce93f52c3045c371ebcf0d7a2e2c6fa50ced3df94cd221e43a55c7/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f64772f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;img alt="npm" src="https://camo.githubusercontent.com/c515d02d79ce93f52c3045c371ebcf0d7a2e2c6fa50ced3df94cd221e43a55c7/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f64772f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/a46485c2a71dfa3ba9a35ceb54d53f19471b0396ed0dddfe100fb0cba72b9171/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;img alt="GitHub Repo stars" src="https://camo.githubusercontent.com/a46485c2a71dfa3ba9a35ceb54d53f19471b0396ed0dddfe100fb0cba72b9171/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/60bd663a17789d15f7007fd4c3f1bdb255d56430bcdf058e64acf8747aa83a65/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;img alt="GitHub forks" src="https://camo.githubusercontent.com/60bd663a17789d15f7007fd4c3f1bdb255d56430bcdf058e64acf8747aa83a65/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/64dc26b4f692a99edab7ce19cd917a2c2c4e82561b08d6f5b1a67c21358145d6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;img alt="GitHub issues" src="https://camo.githubusercontent.com/64dc26b4f692a99edab7ce19cd917a2c2c4e82561b08d6f5b1a67c21358145d6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;/a&gt;
&lt;a href="https://twitter.com/rovelstars" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="X (formerly Twitter) Follow" src="https://camo.githubusercontent.com/4e275482d43519c4b8ae695fe94cd5720f3149377d11a307bd4e0891b0a47f97/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f726f76656c7374617273"&gt;
&lt;/a&gt;
&lt;a href="https://twitter.com/ren_hiyama_gg" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="X (formerly Twitter) Follow" src="https://camo.githubusercontent.com/8d66506941782da68ce75ee3f7d56e37141afbc5215c56df780eaf5b9f7875b1/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f72656e5f686979616d615f6767"&gt;
&lt;/a&gt;
  &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Ree.js is a library that makes web development faster and easier by providing features such as URL Imports, JSX support, and server-side rendering. URL Imports are a way of importing modules from URLs instead of local files or npm packages. This can reduce the download size and improve the performance of your web applications. It doesn't hurt to use the latest features for better performance, right?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;📖 Read Documentation&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Documentation is available at &lt;a href="https://ree.js.org/docs" rel="nofollow noopener noreferrer"&gt;here&lt;/a&gt; . If you find any mistakes, please make an issue. Incase you have any questions, please ask them on our &lt;a href="https://discord.rovelstars.com/server" rel="nofollow noopener noreferrer"&gt;Discord Server&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;✒️ Contributing&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;We welcome all contributions. Please read our &lt;a href="https://github.com/rovelstars/reejs/blob/main/CONTRIBUTING.md" rel="noopener noreferrer"&gt;CONTRIBUTING.md&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🛣️ Roadmap&lt;/h2&gt;

&lt;/div&gt;
&lt;ul class="contains-task-list"&gt;
&lt;li class="task-list-item"&gt;
 Reewrite Packit to be modular&lt;/li&gt;
&lt;li class="task-list-item"&gt;
 Packit in dev mode should run hono server in dev mode, and dynamically transpile &amp;amp; load files on a request.&lt;/li&gt;
&lt;li class="task-list-item"&gt;
 Fix development…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/rovelstars/reejs" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;But wait!!&lt;/strong&gt;&lt;br&gt;
There's more! Surely you're bored of new "faster" frameworks right?&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%2Fderaqiuq2y4ey5mkj84k.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%2Fderaqiuq2y4ey5mkj84k.png" alt="Oh yea, another framework haha" width="576" height="568"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are a veteran webdev/nodejs dev, you might know &lt;code&gt;node_modules&lt;/code&gt; meme&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%2Frutdd866vu2oirrx1frh.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%2Frutdd866vu2oirrx1frh.png" alt="*cough cough* Nextjs hello world app" width="640" height="790"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;cough cough&lt;/em&gt; Nextjs hello world app&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What if I could tell you that Ree.js even is too lightweight? Below 100mb? Nope. Below 10mb? Naw man... 2mb? No!&lt;br&gt;
&lt;code&gt;create-reejs-app&lt;/code&gt; with &lt;code&gt;preact&lt;/code&gt; feature enabled just takes 1mb! (How cool is that!)&lt;/p&gt;

&lt;p&gt;So how did we achieve just small size?&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%2F2r2bo6m4jc3inhnscsr4.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%2F2r2bo6m4jc3inhnscsr4.gif" alt="heck yea babe" width="220" height="124"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  URL Imports
&lt;/h2&gt;

&lt;p&gt;If you have been reading some of my articles last year, you might have seen Reejs supporting URL Imports (yes, using dependencies directly from the internet, like Deno &amp;amp; Browsers!). Think of it as a new way to manage your dependencies. The dependencies you download and use are minified, build target set to your desired runtime and you only download and use files which is only needed! (No more bloatwares like you see on npm packages!)&lt;/p&gt;

&lt;p&gt;But wait... Isn't writing URLs directly in code bad for health right? Yes, that's why Ree.js supports &lt;code&gt;import_map.json&lt;/code&gt; to declare your dependencies!&lt;/p&gt;
&lt;h2&gt;
  
  
  Packit
&lt;/h2&gt;

&lt;p&gt;Think of Packit as a code generator, whose main job is to read files, run plugins ("readers", "writers", "transpilers" are literally secondary!) and write codes to a specified file. We have even managed to import and make use of some vite/rollup/unplugin plugins too! Here are just a few of them that just works:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a class="mentioned-user" href="https://dev.to/aidenybai"&gt;@aidenybai&lt;/a&gt; 's &lt;a href="https://million.dev" rel="noopener noreferrer"&gt;Millionjs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/unplugin/unplugin-auto-import" rel="noopener noreferrer"&gt;Unplugin auto import&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are feeling high, you can even turn on vite mode ⚡️⚡️&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%2Fph5lq1x0gogdzeyabx4f.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%2Fph5lq1x0gogdzeyabx4f.gif" alt="wow" width="272" height="153"&gt;&lt;/a&gt;&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="c1"&gt;//packit.config.js&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;defineConfig&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;vite&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;defineConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You don't need vite installed.&lt;/strong&gt; That's the best part.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Packit will turn on vite mode, and the CLI UI will change to Vite's one. Rest assured, Packit's API is still the same!&lt;br&gt;
(P.S. We currently don't have &lt;em&gt;Hot Module Reload&lt;/em&gt; available. Feel free to contribute!)&lt;/p&gt;

&lt;h2&gt;
  
  
  Support for multiple runtimes!
&lt;/h2&gt;

&lt;p&gt;We aim to run Reejs on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Nodejs&lt;/li&gt;
&lt;li&gt;Deno&lt;/li&gt;
&lt;li&gt;Bun
And to run reejs based websites on:&lt;/li&gt;
&lt;li&gt;all the above mentioned&lt;/li&gt;
&lt;li&gt;cloudflare edge/pages&lt;/li&gt;
&lt;li&gt;fly.io&lt;/li&gt;
&lt;li&gt;Deno Deploy&lt;/li&gt;
&lt;li&gt;and any other serverless runtime!&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Alright. Let me show some cool tricks Reejs comes with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;x&lt;/code&gt; command - Run any scripts off the internet.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;reejs x https://examples.deno.land/color-logging.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;repl&lt;/code&gt; command - Start a Repl (Works only on Nodejs currently)&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Currently Reejs is nearly production ready. Infact that its already faster than Nextjs/Expressjs apps (Thanks to &lt;a href="https://hono.dev" rel="noopener noreferrer"&gt;Hono&lt;/a&gt;) says a lot! We are currently looking for final bug fixes and more performance improvements.&lt;/p&gt;

&lt;p&gt;On my 12yr old PC, Packit can prepare your website within 109ms whereas Vite takes 513ms to just boot up, and another 1.2s to serve the website, and Nextjs (SWC) takes 10s for the initial boot, and another 17s to serve the site. Now compare that with today's modern fast PCs and macbooks, you are sure gonna get a lot of hella performance 🔥🔥🔥&lt;/p&gt;

&lt;p&gt;Oh wait, I forgot to even mention you, Packit is pretty much configurable. You can even modify its internals, thanks to monkeypatch, (just name your plugin after one of the internals' name, and you can replace it.) if you want, you can use any other library yourself. ElysiaJS exists, that's a cool Hono alternative, if you're feeling high as a hecker, maybe go and make your own packit plugin that uses it!&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%2Fl6ur5hssgo1bkgakq24k.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%2Fl6ur5hssgo1bkgakq24k.gif" alt="hecker" width="220" height="124"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So you want to run Reejs on your mobile right? Check out &lt;a href="https://termux.org" rel="noopener noreferrer"&gt;termux&lt;/a&gt;, install Nodejs v18+, and follow the reejs install instructions on our website linked below. Thanks to Reejs' low memory overhead, it works flawlessly smooth on any old midrange phone!&lt;/p&gt;




&lt;p&gt;Reejs will soon go production ready once we tackle all the &lt;a href="https://github.com/rovelstars/reejs/issues" rel="noopener noreferrer"&gt;issues&lt;/a&gt;. Feel free to fix/create any new issues!&lt;/p&gt;

&lt;p&gt;If Reejs doesn't work out for you, try doing this ree-tual:&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%2F0nfcrbdrxf4tmwidp3t0.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%2F0nfcrbdrxf4tmwidp3t0.gif" alt="ritual" width="220" height="220"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Alright. That's probably a lot of stuff you went through. If you feel interested enough, consider checking us out: &lt;a href="https://ree.js.org" rel="noopener noreferrer"&gt;website&lt;/a&gt; or &lt;a href="https://github.com/rovelstars/reejs" rel="noopener noreferrer"&gt;star our repo!&lt;/a&gt;. Hacktoberfest 2023 is going on, feel free to work on any issues mentioned there, or maybe try using Reejs on your next website, and submit any bugs that you find! And also feel free to ask questions in the comment section below!&lt;br&gt;
Bye then!&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%2F7pykt0pe95dqrxiqrhxe.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%2F7pykt0pe95dqrxiqrhxe.gif" alt="Byee!" width="220" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Start Reinventing the Wheel, Maybe Your Wheel will be better than a Rocket!</title>
      <dc:creator>Ren Hiyama</dc:creator>
      <pubDate>Wed, 05 Oct 2022 15:36:55 +0000</pubDate>
      <link>https://dev.to/renhiyama/start-reinventing-the-wheel-maybe-your-wheel-will-be-better-than-a-rocket-3d4i</link>
      <guid>https://dev.to/renhiyama/start-reinventing-the-wheel-maybe-your-wheel-will-be-better-than-a-rocket-3d4i</guid>
      <description>&lt;p&gt;When I started writing my own framework, a lot of people started questioning me, why should anyone use mine over a popular framework like Nextjs, which is backed by a lot of tech giants and even backed by Vercel, compared to my framework only being worked on by me?&lt;br&gt;
Since I couldn't answer them that time since my project was relatively new, It's time to show how reinventing the wheel makes my version of wheel much better than the good-ol' wheel we used to know and use...&lt;/p&gt;
&lt;h2&gt;
  
  
  Ditched NPM, Started Using URL Imports
&lt;/h2&gt;

&lt;p&gt;This might still be a controversial topic on why "you shouldn't use URL Imports!" as seen on my previous blogs™️ (pun intended), let me first answer those people who question that why should you trust a CDN like esm.sh over npm? In the end, we don't bundle node modules folder with the project, and so our server &lt;strong&gt;DOES&lt;/strong&gt; have to download them over their side from npm registry. So if you can't trust a project like esm.sh or esm.run or any other alternatives, you shouldn't really trust npm registry? I have heard people saying that if you depend on third party CDNs, they might send harmful js to your server and execute them... But won't NPM registry server do the same too? (unless someone reports its hacked, npm would be serving a dangerous package without anyone noticing...)&lt;/p&gt;

&lt;p&gt;If we don't spend much time thinking over this security, (and if you really think that much, consider selfhosting esm.sh or your own server for your needs...) let me show you how much storage I saved by converting a Nextjs project to My Framework &lt;a href="https://ree.js.org" rel="noopener noreferrer"&gt;Ree.js&lt;/a&gt;, and it used URL Imports to achieve such less storage!&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%2Fh1f5oil1n2xsszr7te8u.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%2Fh1f5oil1n2xsszr7te8u.png" alt="Nextjs Project" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Nextjs Project Size&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%2Frfzxygp5jx36q7q0e06u.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%2Frfzxygp5jx36q7q0e06u.png" alt="Reejs Project" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Reejs Project Size&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Please note: Reejs doesn't "builds" anything like Nextjs and others does. Consider Reejs to be a framework like Deno's Fresh, that runs on Nodejs and on Deno (and Bun once &lt;strong&gt;their&lt;/strong&gt; bugs are fixed). Not to mention, Reejs' REEST Server has a lot better performance than Fresh's server.&lt;/p&gt;

&lt;p&gt;Consider Reading my blog on my REEST Server:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/renhiyama" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F918116%2Fba4a3f99-9d44-496b-9218-e16ef80ee2f8.jpeg" alt="renhiyama"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/renhiyama/ree-imagine-the-reest-server-for-reejs-1abe" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Ree-Imagine the REEST Server for Ree.js!&lt;/h2&gt;
      &lt;h3&gt;Ren Hiyama ・ Sep 1 '22&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;And to top it off, Reejs maintains a lot better performance than Nextjs.&lt;br&gt;
Let me show you some Lighthouse Stats!&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%2Fdmqp74y16wutd6w0zh1b.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%2Fdmqp74y16wutd6w0zh1b.png" alt="Nextjs Site" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not to mention the Network Tab goes brrr:&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%2Fyl61al33pkxaemw9it86.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%2Fyl61al33pkxaemw9it86.png" alt="Nextjs Network Tab" width="800" height="178"&gt;&lt;/a&gt;&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%2Fpcvkg5mlmio8mc87ww9v.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%2Fpcvkg5mlmio8mc87ww9v.png" alt="Reejs Site" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the Network Tab is simply just too good to be true!&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%2F2mmwg2kgjqqmaqsqrnbw.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%2F2mmwg2kgjqqmaqsqrnbw.png" alt="Reejs Network Tab" width="800" height="230"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;Oh and wait, Nextjs' production builds take a lot of time to build, and that's not the case with Reejs. Not to mention the download time for a Nextjs project (including others too) suffers a HUGE bottleneck thanks to NPM.&lt;/p&gt;



&lt;p&gt;So I think I did reinvent the wheel, and its better, right? It probably won't be the best code, but its definitely better and faster than other frameworks!&lt;/p&gt;

&lt;p&gt;Anyways, I would be soon adding "Resumability" feature from QwikJS framework to Reejs, let's hope it ree-ally becomes a ree-ality!&lt;br&gt;
You might wanna consider adding a star to our Reejs repo:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/rovelstars" rel="noopener noreferrer"&gt;
        rovelstars
      &lt;/a&gt; / &lt;a href="https://github.com/rovelstars/reejs" rel="noopener noreferrer"&gt;
        reejs
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Make Sites Faster, without the need of building anything!
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div&gt;
  &lt;a href="https://github.com/rovelstars/reejs//ree.js.org" rel="nofollow noopener noreferrer"&gt;
  &lt;img src="https://camo.githubusercontent.com/7c111727f5ce3cfa4c53301cfd8b2a0a7f065c3db6248396305be7ac5039d77b/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f73743864696a386174617538683862726e6168752e706e67" height="130px" width="331.5px" alt="Ree.js"&gt;
  &lt;/a&gt;
  &lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Finally the best of both worlds: Fast build times and a great developer experience 😎&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/77e2f7dd0e153886c460de2d8204070074e6f111ab8068393d614b8c16df8d18/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73706f6e736f72732f72656e686979616d613f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562"&gt;&lt;img alt="GitHub Sponsors" src="https://camo.githubusercontent.com/77e2f7dd0e153886c460de2d8204070074e6f111ab8068393d614b8c16df8d18/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73706f6e736f72732f72656e686979616d613f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/5bd058e244d4b450160c93072c5f504100602b743f5e5853e39cba142fb40b56/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;img alt="GitHub contributors" src="https://camo.githubusercontent.com/5bd058e244d4b450160c93072c5f504100602b743f5e5853e39cba142fb40b56/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/c515d02d79ce93f52c3045c371ebcf0d7a2e2c6fa50ced3df94cd221e43a55c7/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f64772f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;img alt="npm" src="https://camo.githubusercontent.com/c515d02d79ce93f52c3045c371ebcf0d7a2e2c6fa50ced3df94cd221e43a55c7/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f64772f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/a46485c2a71dfa3ba9a35ceb54d53f19471b0396ed0dddfe100fb0cba72b9171/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;img alt="GitHub Repo stars" src="https://camo.githubusercontent.com/a46485c2a71dfa3ba9a35ceb54d53f19471b0396ed0dddfe100fb0cba72b9171/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/60bd663a17789d15f7007fd4c3f1bdb255d56430bcdf058e64acf8747aa83a65/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;img alt="GitHub forks" src="https://camo.githubusercontent.com/60bd663a17789d15f7007fd4c3f1bdb255d56430bcdf058e64acf8747aa83a65/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/64dc26b4f692a99edab7ce19cd917a2c2c4e82561b08d6f5b1a67c21358145d6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;img alt="GitHub issues" src="https://camo.githubusercontent.com/64dc26b4f692a99edab7ce19cd917a2c2c4e82561b08d6f5b1a67c21358145d6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f726f76656c73746172732f7265656a733f7374796c653d666f722d7468652d6261646765"&gt;&lt;/a&gt;
&lt;a href="https://twitter.com/rovelstars" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="X (formerly Twitter) Follow" src="https://camo.githubusercontent.com/4e275482d43519c4b8ae695fe94cd5720f3149377d11a307bd4e0891b0a47f97/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f726f76656c7374617273"&gt;
&lt;/a&gt;
&lt;a href="https://twitter.com/ren_hiyama_gg" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="X (formerly Twitter) Follow" src="https://camo.githubusercontent.com/8d66506941782da68ce75ee3f7d56e37141afbc5215c56df780eaf5b9f7875b1/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f72656e5f686979616d615f6767"&gt;
&lt;/a&gt;
  &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Ree.js is a library that makes web development faster and easier by providing features such as URL Imports, JSX support, and server-side rendering. URL Imports are a way of importing modules from URLs instead of local files or npm packages. This can reduce the download size and improve the performance of your web applications. It doesn't hurt to use the latest features for better performance, right?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;📖 Read Documentation&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Documentation is available at &lt;a href="https://ree.js.org/docs" rel="nofollow noopener noreferrer"&gt;here&lt;/a&gt; . If you find any mistakes, please make an issue. Incase you have any questions, please ask them on our &lt;a href="https://discord.rovelstars.com/server" rel="nofollow noopener noreferrer"&gt;Discord Server&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;✒️ Contributing&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;We welcome all contributions. Please read our &lt;a href="https://github.com/rovelstars/reejs/blob/main/CONTRIBUTING.md" rel="noopener noreferrer"&gt;CONTRIBUTING.md&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🛣️ Roadmap&lt;/h2&gt;

&lt;/div&gt;
&lt;ul class="contains-task-list"&gt;
&lt;li class="task-list-item"&gt;
 Reewrite Packit to be modular&lt;/li&gt;
&lt;li class="task-list-item"&gt;
 Packit in dev mode should run hono server in dev mode, and dynamically transpile &amp;amp; load files on a request.&lt;/li&gt;
&lt;li class="task-list-item"&gt;
 Fix development…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/rovelstars/reejs" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Don't forget to hit a like, and bookmark this! Comment down below if you got any questions!&lt;/p&gt;

&lt;p&gt;Btw I got motivated to write this blog, thanks to &lt;a class="mentioned-user" href="https://dev.to/whitep4nth3r"&gt;@whitep4nth3r&lt;/a&gt; 's post:&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/whitep4nth3r" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F492757%2Fc31e9460-d3f1-4fb2-8016-bb03155c42fa.png" alt="whitep4nth3r"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/whitep4nth3r/i-changed-my-mind-about-writing-new-javascript-frameworks-h4m" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;I changed my mind about writing new JavaScript frameworks&lt;/h2&gt;
      &lt;h3&gt;Salma Alam-Naylor ・ Oct 4 '22&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;Ree-inventing the wheel sometimes really makes a better wheel!&lt;/p&gt;

&lt;p&gt;Have an epik Day! 😎&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Introduction to AI &amp; ML</title>
      <dc:creator>Ren Hiyama</dc:creator>
      <pubDate>Sun, 25 Sep 2022 02:07:17 +0000</pubDate>
      <link>https://dev.to/renhiyama/introduction-to-ai-ml-1jdb</link>
      <guid>https://dev.to/renhiyama/introduction-to-ai-ml-1jdb</guid>
      <description>&lt;p&gt;So you want to learn about AI and Machine Learning? You've come to the right place! This is a beginner's guide to AI and Machine Learning. Let's get started right away!&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%2Fc.tenor.com%2F4yEqi3nmP0QAAAAM%2Fsteven-he-glasses.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%2Fc.tenor.com%2F4yEqi3nmP0QAAAAM%2Fsteven-he-glasses.gif" alt="Let's start" width="220" height="124"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is AI?
&lt;/h2&gt;

&lt;p&gt;AI stands for Artificial Intelligence. It is the intelligence of machines and computer programs. AI is a very broad field, and there are many different sub-fields. In this article, we will focus on Machine Learning, which is a sub-field of AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Machine Learning?
&lt;/h2&gt;

&lt;p&gt;Machine Learning is a sub-field of AI that focuses on building programs that can learn from data. These programs are called Machine Learning models. A Machine Learning model is trained on a dataset, and then it can make predictions on new data.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a dataset?
&lt;/h2&gt;

&lt;p&gt;A dataset is a collection of data. It is used to train Machine Learning models. There are many different kinds of datasets. In this article, we will focus on tabular datasets, which are datasets that are organized into rows and columns. Here is an example of a dataset&lt;/p&gt;




&lt;h2&gt;
  
  
  What is a Machine Learning model?
&lt;/h2&gt;

&lt;p&gt;A machine learning model is an expression of an algorithm that combs through mountains of data to find patterns or make predictions. Fueled by data, machine learning (ML) models are the mathematical engines of artificial intelligence.&lt;/p&gt;

&lt;p&gt;For example, an ML model for computer vision might be able to identify cars and pedestrians in a real-time video. One for natural language processing might translate words and sentences.&lt;/p&gt;

&lt;p&gt;Under the hood, a machine learning model is a mathematical representation of objects and their relationships to each other. The objects can be anything from “likes” on a social networking post to molecules in a lab experiment.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are some of the most popular Machine Learning models?
&lt;/h2&gt;

&lt;p&gt;There are many different kinds of Machine Learning models. Here are some of the most popular ones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Decision Trees&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Random Forests&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Gradient Boosting Machines&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Support Vector Machines&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Neural Networks&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How do Machine Learning models work?
&lt;/h2&gt;

&lt;p&gt;Machine Learning models are trained on data. This data is usually organized into rows and columns. Each row is an example, and each column is a feature. Here is an example of a dataset:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;PassengerId&lt;/th&gt;
&lt;th&gt;Survived&lt;/th&gt;
&lt;th&gt;Pclass&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The first column is the &lt;strong&gt;PassengerId&lt;/strong&gt;. This is a unique identifier for each passenger. The second column is the &lt;strong&gt;Survived&lt;/strong&gt; column. This is the target variable. It tells us whether or not the passenger survived. The third column is the &lt;strong&gt;Pclass&lt;/strong&gt; column. This is a feature. It tells us the class of the passenger's ticket.&lt;/p&gt;

&lt;p&gt;The goal of a Machine Learning model is to learn the relationship between the features and the target variable. This is called &lt;strong&gt;training&lt;/strong&gt; the model. Once the model has learned the relationship between the features and the target variable, it can make predictions on new data. This is called &lt;strong&gt;inference&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Types of Machine Learning
&lt;/h2&gt;

&lt;p&gt;There are many different types of Machine Learning. Here are some of the most popular ones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Supervised Learning&lt;/strong&gt;: Supervised learning is the most common type of Machine Learning. In supervised learning, the data you train your model on includes the target variable. This means that you tell the model what the correct answer is. The model then learns the relationship between the features and the target variable. Once the model has learned this relationship, it can make predictions on new data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unsupervised Learning&lt;/strong&gt;: Unsupervised learning is used when the data you train your model on does not include the target variable. This means that you do not tell the model what the correct answer is. Instead, the model must figure out the relationship between the features on its own. This is a very difficult task, and it is not very common. Most Machine Learning problems are supervised learning problems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reinforcement Learning&lt;/strong&gt;: Reinforcement learning is a type of Machine Learning where the model is trained using trial and error. The model makes a guess, and then it receives a reward or a penalty based on how good its guess was. This process is repeated many times. Eventually, the model learns the relationship between the features and the target variable.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Amazing Projects that uses AI &amp;amp; ML
&lt;/h2&gt;

&lt;p&gt;Below is a list that I think are quite good in what they have achieved:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/features/copilot" rel="noopener noreferrer"&gt;Github Copilot&lt;/a&gt; - GitHub Copilot uses the OpenAI Codex to suggest code and entire functions in real-time, right from your editor.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://openai.com/dall-e-2/" rel="noopener noreferrer"&gt;Dall.E 2&lt;/a&gt; - DALL·E 2 is a new AI system that can create realistic images and art from a description in natural language.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://wandb.ai/geekyrakshit/adversarial%20skill%20embeddings/reports/Adversarial-Skill-Embeddings--VmlldzoyMjc3OTU5" rel="noopener noreferrer"&gt;Nvidia Simulating Human Movements over 10 years!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Every new midrange to flagship Phone now-a-days in the field of &lt;del&gt;adding 5 layers of virtual makeup&lt;/del&gt; Photography, Face Unlock, and AR and heck even, game enemies!&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.tensorflow.org/" rel="noopener noreferrer"&gt;TensorFlow&lt;/a&gt; - A framework every developer has heard of/used if they are studying and progressing in the field of AI &amp;amp; ML.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/AMAI-GmbH/AI-Expert-Roadmap" rel="noopener noreferrer"&gt;AI Expert Roadmap&lt;/a&gt; - Roadmap to becoming an Artificial Intelligence Expert in 2022
And a lot more others! Feel free to send more in comment section and they will be added here!&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;This Blog was a basic introduction to AI &amp;amp; ML, and the most fun fact is that I recently took interest in this field, and I have been studying on this for more than a month now. Feel free to post any doubts, suggestions, fixes or anything else in the comment section.&lt;br&gt;
Found any mistake? Comment it down too! Want more articles from me? Let me know!&lt;br&gt;
Join my Discord Server at: &lt;a href="https://dscrdly.com/server" rel="noopener noreferrer"&gt;https://dscrdly.com/server&lt;/a&gt;&lt;br&gt;
Star the current project I am working on: &lt;a href="https://github.com/rovelstars/reejs" rel="noopener noreferrer"&gt;https://github.com/rovelstars/reejs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have a nice day Developer!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Features In Nodejs that you might have missed! 🪁</title>
      <dc:creator>Ren Hiyama</dc:creator>
      <pubDate>Sun, 18 Sep 2022 01:54:12 +0000</pubDate>
      <link>https://dev.to/renhiyama/features-in-nodejs-that-you-might-have-missed-mpc</link>
      <guid>https://dev.to/renhiyama/features-in-nodejs-that-you-might-have-missed-mpc</guid>
      <description>&lt;p&gt;Hey there, it's your dev Ren again! Thanks to everyone who read my last week's post on &lt;a href="https://dev.to/renhiyama/make-it-short-make-it-better-4l0n"&gt;Make it Short - Make it Better&lt;/a&gt; and if you haven't, make sure to check it out!&lt;br&gt;
Anyways let's get started!&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%2Fc.tenor.com%2F4yEqi3nmP0QAAAAM%2Fsteven-he-glasses.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%2Fc.tenor.com%2F4yEqi3nmP0QAAAAM%2Fsteven-he-glasses.gif" alt="Let's start" width="220" height="124"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  1. Top Level Await
&lt;/h2&gt;

&lt;p&gt;It's finally here! We can now directly use this:&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="nx"&gt;fetch&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;node-fetch&lt;/span&gt;&lt;span class="dl"&gt;"&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;res&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;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://example.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cheers 🍻! We previously had to wrap them inside a async function like this:&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="nx"&gt;fetch&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;node-fetch&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;res&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;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://example.com&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  2. Did you know Dynamic Imports existed?
&lt;/h2&gt;

&lt;p&gt;They are a live saver in some cases, because you can't execute &lt;code&gt;import x from "y"&lt;/code&gt; inside a function or a scope. You just need to use the dynamic imports version instead like this:&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;let&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;y&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Important Note:&lt;/strong&gt; Dynamic Imports have a downside as well, and I would suggest writing or using a custom &lt;code&gt;Import&lt;/code&gt; function (like I do) that fixes some of the problems it has... For example,&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="nx"&gt;x&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;y&lt;/span&gt;&lt;span class="dl"&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="nf"&gt;x&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;y.js file:&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;export&lt;/span&gt; &lt;span class="k"&gt;default &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;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hi&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While the first one works, this code won't:&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;let&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;y&lt;/span&gt;&lt;span class="dl"&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="nf"&gt;x&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead you need to use &lt;code&gt;console.log(x.default());&lt;/code&gt;&lt;br&gt;
Or a better version:&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;let&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&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;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;y&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But I would suggest to my own version of Imports, which you can easily use by this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i @reejs/imports
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now Initialize 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="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;DynamicImport&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="s2"&gt;@reejs/imports&lt;/span&gt;&lt;span class="dl"&gt;"&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;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;DynamicImport&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;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;y&lt;/span&gt;&lt;span class="dl"&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="nf"&gt;x&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;//works!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Basically it imports the same dependency/file, and the &lt;code&gt;DynamicImport&lt;/code&gt; function runs a loop on it to get all the properties and save it in a new object, and make default work just like static imports do. (Not to mention my &lt;code&gt;URLImport&lt;/code&gt; function from &lt;code&gt;@reejs/imports&lt;/code&gt; even supports URL Imports on Node v18 incase you wanna try it out! 😉)&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Use Underscores with Integers for extra readability!
&lt;/h2&gt;

&lt;p&gt;Instead of using this:&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;let&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000000000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can now use:&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;let&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="nx"&gt;_000_000_000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;God who doesn't love an extra readability? I do atleast.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Weak References (So you can scream on Garbage Collector)
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;WeakRef&lt;/code&gt; stands for Weak References. It allows you to create a weak reference to an object. A weak reference to an object is a reference that does not prevent the object from being reclaimed by the garbage collector.&lt;/p&gt;

&lt;p&gt;The primary use of Weak Reference is to implement caches or mappings of large objects. Where it’s desired that a large object is not kept alive solely because it appears in a cache or mapping.&lt;/p&gt;

&lt;p&gt;For example:&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;obj&lt;/span&gt; &lt;span class="o"&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;Ren&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;lastname&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hiyama&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;refObj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;WeakRef&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you need to read the value of WeakRefs, need to use the &lt;code&gt;deref()&lt;/code&gt; method to return the instance.&lt;/p&gt;

&lt;p&gt;Continuing from the above example,&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;copyObj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;refObj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deref&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;copyObj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Ren&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Garbage collectors are complicated. If an application or library depends on GC cleaning up a WeakRef or calling a finalizer in a timely, predictable manner, it's likely to be disappointed: the cleanup may happen much later than expected, or not at all. Sources of variability include:&lt;/p&gt;

&lt;p&gt;One object might be garbage-collected much sooner than another object, even if they become unreachable at the same time, e.g., due to generational collection.&lt;br&gt;
Garbage collection work can be split up over time using incremental and concurrent techniques.&lt;br&gt;
Various runtime heuristics can be used to balance memory usage, responsiveness.&lt;br&gt;
The JavaScript engine may hold references to things which look like they are unreachable (e.g., in closures, or inline caches).&lt;br&gt;
Different JavaScript engines may do these things differently, or the same engine may change its algorithms across versions.&lt;br&gt;
Complex factors may lead to objects being held alive for unexpected amounts of time, such as use with certain APIs.&lt;/p&gt;

&lt;p&gt;For that reason, using WeakRef is not recommended and it’s best to avoid implementing one if possible unless you really wanna have a bad time (joke).&lt;/p&gt;


&lt;h2&gt;
  
  
  4. Tuples? Are we Pee-thon ready yet? Nah it's just Typescript lol...
&lt;/h2&gt;

&lt;p&gt;A tuple is a typed array with a pre-defined length and types for each index.&lt;/p&gt;

&lt;p&gt;Tuples are great because they allow each element in the array to be a known type of value.&lt;/p&gt;

&lt;p&gt;If we want to define a tuple, we specify the type of each element in the array:&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="c1"&gt;//define a tuple&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;tup&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="c1"&gt;// now initialize it!&lt;/span&gt;
&lt;span class="nx"&gt;tup&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Ree Was Here (not Ren btw!)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we happen to have those elements in a wrong order, we get an error.&lt;/p&gt;

&lt;p&gt;Check out Read Only Tuple BTW:&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="c1"&gt;// define our readonly tuple&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tup&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;readonly&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Ree!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="c1"&gt;// throws error as it is readonly.&lt;/span&gt;
&lt;span class="nx"&gt;tup&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Welp Failure Management&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Guess what? If you were a React Developer, you were using Tuples under the hood 😳&lt;/p&gt;




&lt;p&gt;I hope I made you learn something new today! If I did, consider hitting a like, a unicorn and a bookmark on this Post! Also you can hit a star on my current project - Reejs at &lt;a href="https://github.com/rovelstars/reejs" rel="noopener noreferrer"&gt;https://github.com/rovelstars/reejs&lt;/a&gt; , a star means a lot to me!&lt;/p&gt;

&lt;p&gt;Have a nice day 🙃!&lt;/p&gt;

&lt;p&gt;Found any Problems with this blog? Comment it down Below!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Make it Short - Make it Better</title>
      <dc:creator>Ren Hiyama</dc:creator>
      <pubDate>Sat, 10 Sep 2022 18:40:22 +0000</pubDate>
      <link>https://dev.to/renhiyama/make-it-short-make-it-better-4l0n</link>
      <guid>https://dev.to/renhiyama/make-it-short-make-it-better-4l0n</guid>
      <description>&lt;p&gt;Hey there Fellow Javascript Coder!&lt;br&gt;
Whether you're a experienced programmer or just someone who just started with javascript basics, this list of hacks is definitely for you! Please note that you might have already known one or more features of javascript from the below list, and that's &lt;strong&gt;awesome&lt;/strong&gt;! But not everyone knows them 😉&lt;/p&gt;

&lt;p&gt;So let's straight hop in!&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%2Fuiv477pw74o323vdkgls.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%2Fuiv477pw74o323vdkgls.gif" alt="Let's start" width="220" height="124"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Convert Any Datatype to Boolean
&lt;/h2&gt;

&lt;p&gt;By using &lt;code&gt;!!&lt;/code&gt; in front of any variable, we can get the Boolean version of it! Let's see how:&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;let&lt;/span&gt; &lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;!!&lt;/span&gt;&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="c1"&gt;// returns true&lt;/span&gt;
&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;!!&lt;/span&gt;&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="c1"&gt;//returns false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Isn't this easier to write and use in real life?&lt;br&gt;
Well, this is more easier:&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;let&lt;/span&gt; &lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&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;variable&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;True&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Logs True!&lt;/span&gt;
&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&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;variable&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;True&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// doesn't log anything&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Find whether a property exists in an Object
&lt;/h2&gt;

&lt;p&gt;If you were using &lt;code&gt;if(obj.property)&lt;/code&gt; or &lt;code&gt;if(obj["property"])&lt;/code&gt; till now, it's time to make your code more readable by using &lt;code&gt;if("property" in obj)&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Become Lazy and truncate Array just as you wanted
&lt;/h2&gt;

&lt;p&gt;This just works!&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;let&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&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;arr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Logs all the 10 elements&lt;/span&gt;
&lt;span class="nx"&gt;arr&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;=&lt;/span&gt; &lt;span class="mi"&gt;5&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;arr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Logs only [1, 2, 3, 4, 5] Holy Moly!?&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Remove Duplicates from your Array
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&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;arr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// [1, 2, 1], as expected.&lt;/span&gt;
&lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&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;arr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// [1, 2], and cheers!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Avoid Server Lag during 2 or more Array Concats
&lt;/h2&gt;

&lt;p&gt;Instead of using this:&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;let&lt;/span&gt; &lt;span class="nx"&gt;list1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;b&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;c&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;d&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;e&lt;/span&gt;&lt;span class="dl"&gt;'&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;list2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;f&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;g&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;h&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;i&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;j&lt;/span&gt;&lt;span class="dl"&gt;'&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;list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;list1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;concat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;list2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Try using this alternative:&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;let&lt;/span&gt; &lt;span class="nx"&gt;list1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;b&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;c&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;d&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;e&lt;/span&gt;&lt;span class="dl"&gt;'&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;list2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;f&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;g&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;h&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;i&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;j&lt;/span&gt;&lt;span class="dl"&gt;'&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;list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;list1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;list1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;list2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The latter code saves your server from high memory consumption because the first code creates a new array in memory, whereas this one works with the &lt;code&gt;list1&lt;/code&gt; array instead of creating a new array.&lt;/p&gt;




&lt;p&gt;I hope I made you learn something new today! If I did, consider hitting a like, a unicorn and a bookmark on this Post! Also you can hit a star on my current project - Reejs at &lt;a href="https://github.com/rovelstars/reejs" rel="noopener noreferrer"&gt;https://github.com/rovelstars/reejs&lt;/a&gt; , a star means a lot to me!&lt;/p&gt;

&lt;p&gt;Have a nice day 🙃!&lt;/p&gt;

&lt;p&gt;P.S. Comment down below if you have any ideas on what the next blog should be, I will try my best if I can write on it!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>No Build Required Tailwind alternative - Twind 🎏</title>
      <dc:creator>Ren Hiyama</dc:creator>
      <pubDate>Wed, 07 Sep 2022 01:22:31 +0000</pubDate>
      <link>https://dev.to/renhiyama/no-build-required-tailwind-alternative-twind-2ap7</link>
      <guid>https://dev.to/renhiyama/no-build-required-tailwind-alternative-twind-2ap7</guid>
      <description>&lt;h2&gt;
  
  
  What is Twind?
&lt;/h2&gt;

&lt;p&gt;Twind is the smallest, fastest, most feature complete tailwind-in-js solution in existence. Unlike Tailwind (v3) it doesn't build anything, and if you want to, you can bundle twind js file to your client! I mean it just works out of the box 😮&lt;/p&gt;

&lt;h2&gt;
  
  
  Forget your build step that you have on Tailwind v3!
&lt;/h2&gt;

&lt;p&gt;Get all the benefits of Tailwind without the need for PostCSS, configuration, purging, or autoprefixing. It's just that fast that it can generate css for your whole website in nearly &lt;strong&gt;0.2ms&lt;/strong&gt;!&lt;/p&gt;

&lt;h2&gt;
  
  
  No Vendor lock-in from any framework!
&lt;/h2&gt;

&lt;p&gt;Most of the time you use Tailwind with a preconfigured Nextjs app or a similar Framework where everything's setup for you. But since Twind requires little to no configuration as you have on Tailwind, it's the choice a lot of people prefer when they just want to make a site that they don't want to build anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  😎 One small but low fixed cost
&lt;/h2&gt;

&lt;p&gt;The compiler for Twind v1 costs only &lt;strong&gt;4.5kb&lt;/strong&gt; which is more than 2x smaller than the previous version of Twind (v0) which costed 13kb! Thanks to Sastan for really making this awesome project 🥰&lt;/p&gt;

&lt;h2&gt;
  
  
  MIT Licensed
&lt;/h2&gt;

&lt;p&gt;Just thought to let you know it uses one of the most non-restrictive License - MIT License!&lt;/p&gt;




&lt;h2&gt;
  
  
  For Your Information:
&lt;/h2&gt;

&lt;p&gt;Twind v1 Website is present at &lt;a href="https://twind.style" rel="noopener noreferrer"&gt;https://twind.style&lt;/a&gt;&lt;br&gt;
Twind v0 Website is present at &lt;a href="https://twind.dev" rel="noopener noreferrer"&gt;https://twind.dev&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  How to use Twind v1?
&lt;/h2&gt;

&lt;p&gt;Currently there are no docs, because Sastan is pretty busy with his everyday's work and family, but that doesn't stops us from writing this blog that explains how you can use it!&lt;/p&gt;
&lt;h2&gt;
  
  
  Method 1: Use a supported Twind v1 Framework
&lt;/h2&gt;

&lt;p&gt;Consider Using any of these two frameworks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ree.js: &lt;a href="https://github.com/rovelstars/reejs" rel="noopener noreferrer"&gt;https://github.com/rovelstars/reejs&lt;/a&gt; (For Both Node.js &amp;amp; Deno Users)&lt;/li&gt;
&lt;li&gt;Fresh: &lt;a href="https://fresh.deno.dev" rel="noopener noreferrer"&gt;https://fresh.deno.dev&lt;/a&gt; (For Deno Users)
Both of these frameworks comes bundled with Twind, and you can opt-out on each of them!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Method 2: Start from Scratch:
&lt;/h2&gt;

&lt;p&gt;For your information, We need to use different packages for different methods of Rendering. For Client Side Rendering, we use &lt;code&gt;@twind/cdn&lt;/code&gt;. For Server Side Rendering, we use &lt;code&gt;twind&lt;/code&gt;.&lt;br&gt;
and &lt;code&gt;@twind/preset-tailwind&lt;/code&gt; because its a small polyfill that tells all the rules of how to generate tailwind classes to Twind. And spoiler alert! It's freaking fast!&lt;/p&gt;



&lt;p&gt;We at Ree.js uses both of the modes, and we are gonna share our experience with how to add Twind v1 to your website in the most easy way!&lt;/p&gt;


&lt;h2&gt;
  
  
  Server Side Rendering
&lt;/h2&gt;

&lt;p&gt;Install the mentioned package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;npm i twind@next @twind/preset-tailwind@next
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Import them to your server application:&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="nx"&gt;twind&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;twind&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;presetTW&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;@twind/preset-tailwind&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;twind&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
 &lt;span class="cm"&gt;/* config */&lt;/span&gt;
 &lt;span class="na"&gt;presets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;presetTW&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;//Here app is a server, we are following h3 server specification and not express, but most of the time its just same!&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/&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="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&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;let&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`&amp;lt;div class="min-h-screen bg-indigo-600"&amp;gt;&amp;lt;p class="font-bold text-white text-7l"&amp;gt;Hello From Twind!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;`&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;css&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;twind&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;extract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;css&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;html&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;style&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
&amp;lt;/style&amp;gt;
&amp;lt;body&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;`&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;html&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// I remember you probably need to use res.send(html) on expressjs server ;)&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Please note this is a small example, and you probably need to add some meta tags and other stuff to your html string.&lt;/p&gt;

&lt;p&gt;But, looks like we have completed!&lt;/p&gt;




&lt;h2&gt;
  
  
  Client Side Rendering
&lt;/h2&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;html&lt;/span&gt; &lt;span class="na"&gt;hidden&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"module"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;twind&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://esm.run/@twind/cdn@next&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;twind&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&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;html&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;removeAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hidden&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"min-h-screen bg-indigo-600"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-bold text-white text-7l"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Hello From Twind!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;hidden&lt;/code&gt; attribute won't show the page before Twind loads, therefore fixing that "FlashBang!" White Screen 😅&lt;/p&gt;




&lt;p&gt;Happy Coding &amp;amp; Have a nice Day!&lt;br&gt;
Thanks for Sastan to help me out with setting Twind v1 myself!&lt;br&gt;
If you like this post, consider a like, unicorn and share it with your friends!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Use URL Imports in Nodejs v16 without experimental hacks!</title>
      <dc:creator>Ren Hiyama</dc:creator>
      <pubDate>Sun, 04 Sep 2022 12:31:56 +0000</pubDate>
      <link>https://dev.to/renhiyama/use-url-imports-in-nodejs-v16-without-experimental-hacks-4h0</link>
      <guid>https://dev.to/renhiyama/use-url-imports-in-nodejs-v16-without-experimental-hacks-4h0</guid>
      <description>&lt;p&gt;When We first made our own implementation of URL Imports for &lt;a href="https://ree.js.org" rel="noopener noreferrer"&gt;Ree.js&lt;/a&gt; we learnt a simple hack from &lt;a href="https://dev.to/mxfellner/dynamic-import-with-http-urls-in-node-js-7og"&gt;here&lt;/a&gt; that was based using experimental tags.&lt;/p&gt;

&lt;p&gt;Since now Nodejs was going to bring that feature natively in future versions, we thought of why shouldn't we pull that feature down, so we could have a cross platform of features being run across different platforms? (ie. Nodejs, Bun &amp;amp; maybe Deno)&lt;/p&gt;

&lt;h2&gt;
  
  
  But Deno already has them!
&lt;/h2&gt;

&lt;p&gt;Yea sure they got them, but if we were meant to provide cross platform solution for our codes (ie, it could run on different platforms with same UI and same mechanics so its imported the same way across them), we got to create our own!&lt;/p&gt;

&lt;h2&gt;
  
  
  How do we solve this problem?
&lt;/h2&gt;

&lt;p&gt;Thanks to &lt;a href="https://github.com/guybedford/es-module-lexer" rel="noopener noreferrer"&gt;es-module-lexer&lt;/a&gt; we can easily find all the imports in a js code, if we just replace those url imports present in those codes themselves with an absolute file path, we can easily dynamically import them.&lt;/p&gt;

&lt;p&gt;So when we are asked to import a package, for example, &lt;code&gt;https://esm.run/preact&lt;/code&gt;, we first fetch it with &lt;code&gt;node-fetch&lt;/code&gt; package, and then run a loop on the code, to find out the imports urls, crawl them and run the same recursive function on them; and we continue replacing the urls with absolute file paths:&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;let&lt;/span&gt; &lt;span class="nx"&gt;code&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;_fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;originalUrl&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;_imports&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="nx"&gt;lexer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="nx"&gt;_imports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_imports&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;i&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;n&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;_imports&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="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_imports&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="k"&gt;async&lt;/span&gt; &lt;span class="nx"&gt;i&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;let&lt;/span&gt; &lt;span class="nx"&gt;to&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;dl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;local&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="nx"&gt;code&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replaceAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;to&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;What's &lt;code&gt;dl&lt;/code&gt; ? It's the recursive function I said above!&lt;br&gt;
After those codes, we use &lt;code&gt;fs&lt;/code&gt; to save those js files in their respective folder structure.&lt;/p&gt;



&lt;p&gt;Shall we test it out?&lt;/p&gt;

&lt;p&gt;Download Ree.js (currently we have bundled this url imports feature with Ree.js itself 😅)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i reejs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now add this script in your code:&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="nx"&gt;Import&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;reejs/import.js&lt;/span&gt;&lt;span class="dl"&gt;"&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;chalk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nc"&gt;Import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://esm.sh/chalk?target=node&lt;/span&gt;&lt;span class="dl"&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;chalk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;green&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;We Did It!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can now see:&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%2Fy7lcgqgqyl1ra981o18i.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%2Fy7lcgqgqyl1ra981o18i.png" alt="We Did It!" width="561" height="73"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;If you made this far, great! You can read the full source code of this file at: &lt;a href="https://github.com/rovelstars/reejs/blob/master/utils/urlimports.js" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;br&gt;
Consider even reading the file that we actually import (&lt;code&gt;server/import.js&lt;/code&gt;), it's built on top of our url import "technology" that fixes some stupid stuff like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instead of &lt;code&gt;chalk&lt;/code&gt; having all the properties, you needed to use &lt;code&gt;chalk.default&lt;/code&gt; to get them... This issue happens with the way dynamic imports works...&lt;/li&gt;
&lt;li&gt;Can read imports maps from your project directory's &lt;code&gt;import-maps.json&lt;/code&gt; and &lt;code&gt;server.import-maps.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Can import relative files, as well as absolute files, and even the native nodejs modules/npm modules!&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Do you love this idea?
&lt;/h2&gt;

&lt;p&gt;Consider commenting if you want this feature to be as a package of its own on npm!&lt;/p&gt;

&lt;p&gt;Also don't forget to star Ree.js Repo at &lt;a href="https://github.com/rovelstars/reejs" rel="noopener noreferrer"&gt;https://github.com/rovelstars/reejs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Come and talk to us on Discord: &lt;a href="https://dscrdly.com/server" rel="noopener noreferrer"&gt;https://dscrdly.com/server&lt;/a&gt;&lt;br&gt;
Hit a Like and A Unicorn to show some support, share this post with your fellow friends/devs and maybe you even want to read my other articles? Check them out on my page!&lt;/p&gt;

&lt;p&gt;Have an Epik Day!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Ree-Imagine the REEST Server for Ree.js!</title>
      <dc:creator>Ren Hiyama</dc:creator>
      <pubDate>Thu, 01 Sep 2022 07:13:51 +0000</pubDate>
      <link>https://dev.to/renhiyama/ree-imagine-the-reest-server-for-reejs-1abe</link>
      <guid>https://dev.to/renhiyama/ree-imagine-the-reest-server-for-reejs-1abe</guid>
      <description>&lt;p&gt;Ever Used Next.js? I am sure you did if you call yourself a ReactJS Developer! Well, the thing is... it still uses... ExpressJS in what..? 2022? Are we still meant to use such a slow framework in today's "fast" world?&lt;/p&gt;

&lt;p&gt;Well, Let's dive straight into the benchmarks for Next.js (such a "battle-tested" framework for "Production" servers) and compare it with Reejs' server:&lt;/p&gt;

&lt;h2&gt;
  
  
  Next.js In Dev (because why not?)
&lt;/h2&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%2Fzbr6n3brymz2vojce6ou.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%2Fzbr6n3brymz2vojce6ou.png" alt="Nextjs Dev" width="609" height="269"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Next.js in Production (this should interest you!)
&lt;/h2&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%2Ftgdnsw3otuxyxhmlh3ys.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%2Ftgdnsw3otuxyxhmlh3ys.png" alt="Nextjs Production" width="613" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Fresh from Deno
&lt;/h2&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%2Fmui4r7z6x9jfp56f7hxu.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%2Fmui4r7z6x9jfp56f7hxu.png" alt="Fresh" width="597" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;(Its like Ree.js but on Deno, btw Ree.js runs on Deno incase you don't know!)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Ree.js in Dev
&lt;/h2&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%2Fuvpcip3mhlx6u7iftrch.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%2Fuvpcip3mhlx6u7iftrch.png" alt="Reejs Dev" width="599" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;console.log&lt;/code&gt; is a good bottleneck for the loggings :(&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Ree.js in Production (Game-breaking mode activated I mean!)
&lt;/h2&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%2Fnkinosiyeuoa6umvajc8.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%2Fnkinosiyeuoa6umvajc8.png" alt="Reejs Production" width="593" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Gas Gas Gas, ReeJS is so freaking FAST!&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;So you might wonder why am I running Next.js in dev and even comparing it with Ree.js in dev?&lt;/p&gt;

&lt;p&gt;My answer would be, why are we devs not thinking about DevX (Developer eXperience) and only focusing on UX (User Experience)?&lt;br&gt;
Are all the devs in our world having a beefy PC to code on? I don't think so 🥲... And to backup my point, Let's go a month back...&lt;/p&gt;

&lt;p&gt;Ever heard of Bun? &lt;a href="https://bun.dev" rel="noopener noreferrer"&gt;Bun&lt;/a&gt; - The new Nodejs/Deno alternative that aims to be more fast. I give a huge round of applause for them to make something that will be faster, but my point brings to the github issue which still ranks #1 to this day on Google Search 😅&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%2Fxvl0i3tm98wt68n5xc1r.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%2Fxvl0i3tm98wt68n5xc1r.png" alt="https://github.com/oven-sh/bun/issues/282" width="626" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While Bun now provides builds that don't need AVX2 Requirement, we can see that issue that a lot of devs actually use a old pc to code on, and my PC is 11yrs old (Yet, I managed to run Windows 11 on my old pc with some optimizations to use 1.2gb ram on startup 😅) But you get the idea... Not everyone has access to latest resources!&lt;/p&gt;

&lt;p&gt;So why we are devs acting as if we all have Beefy PCs? Just because "you" have doesn't mean everyone has it! (No hate to anyone btw)&lt;/p&gt;

&lt;h3&gt;
  
  
  My thoughts
&lt;/h3&gt;

&lt;p&gt;We should really focus on DevX along with UX. I mean it's pretty much not bad... Both Reejs &amp;amp; Fresh doesn't build anything, so why are we still "building" in dev mode?&lt;/p&gt;




&lt;h3&gt;
  
  
  Oh sheesh...
&lt;/h3&gt;

&lt;p&gt;Did you just realise I just moved the topic from one part to another? Ah my bad, shall we go back to the server topic?&lt;/p&gt;

&lt;p&gt;Thanks to &lt;a href="https://github.com/unjs/h3" rel="noopener noreferrer"&gt;h3&lt;/a&gt; for their awesome server framework that helps us reach newer limits! They (UnJS) currently have Nitro server (That's used In NuxtJS incase you wondered why do they have that lol) but the problem is Nitro server still requires you to build...&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%2Fxu8frp6bw0h0l1840gn1.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%2Fxu8frp6bw0h0l1840gn1.gif" alt="What Da Hail?" width="498" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Meet REEST
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Ree Server Takeover&lt;/strong&gt; - Don't let the words deceive you!&lt;br&gt;
This new upcoming server will be itself based on &lt;strong&gt;h3&lt;/strong&gt; server, provide all the features of &lt;a href="https://nitro.unjs.io" rel="noopener noreferrer"&gt;Nitro&lt;/a&gt; server, without &lt;strong&gt;"building"&lt;/strong&gt; because it's ree-ally not necessary to build!&lt;br&gt;
But why the name "Takeover"? This takes over "your" problems and tries its best to fix it! You can now go and "take reest!"&lt;/p&gt;

&lt;h3&gt;
  
  
  Some Noticeable Features 🎏
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Host more servers on different ports that run their own service, and they run on different threads rather than on the main JS thread so it's more efficient 🎯&lt;/li&gt;
&lt;li&gt;Be as Fast as Serverless &lt;del&gt;so you don't need serverless lol&lt;/del&gt;
&lt;/li&gt;
&lt;li&gt;Host on Serverless (Reejs currently can't run as SSR mode on serverless, you have to choose the static mode deployment and REEST shall work to fix that!)&lt;/li&gt;
&lt;li&gt;Aim to be Beginner-Friendly 😌&lt;/li&gt;
&lt;li&gt;Aim to be "Ree"-quality friendly (I mean how you scream "reeeeeee!!!" when your code doesn't work; Reejs can help you fix that, or scream "reeeeee!!!" on your behalf 😉👏)&lt;/li&gt;
&lt;li&gt;Comment down below what else would you like to see!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;REX-MODE&lt;/strong&gt; Coming Soon™️! &lt;em&gt;Spoiler Alert: you will love the way it handles the server efficiently!&lt;/em&gt; 😏&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Thanks for sticking around! 🤝
&lt;/h2&gt;

&lt;p&gt;Come Talk with us, and help us shape the futuree of Reejs on our Discord Server at &lt;a href="https://dscrdly.com/server" rel="noopener noreferrer"&gt;https://dscrdly.com/server&lt;/a&gt; !&lt;br&gt;
Hit a star on our Github repo to show support 🤗 &lt;a href="https://github.com/rovelstars/reejs" rel="noopener noreferrer"&gt;https://github.com/rovelstars/reejs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Making a new open-source "general" template project with Reejs? You may want to check out building on &lt;a href="https://github.com/ree-js" rel="noopener noreferrer"&gt;https://github.com/ree-js&lt;/a&gt; , Join our Discord server to notify us about it!&lt;/p&gt;

&lt;p&gt;Have a "REE"-free Day! 😅&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%2Fwf39vg0lpm3uobkzf2w7.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%2Fwf39vg0lpm3uobkzf2w7.gif" alt="Example: You being in REE mode" width="500" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I don't want to see you do this, that's why I made Reejs in the first place! 😉&lt;/p&gt;
&lt;/blockquote&gt;

</description>
    </item>
    <item>
      <title>"No-Build Required" Reeact Framework</title>
      <dc:creator>Ren Hiyama</dc:creator>
      <pubDate>Wed, 31 Aug 2022 01:11:44 +0000</pubDate>
      <link>https://dev.to/renhiyama/no-build-required-reeact-framework-38m</link>
      <guid>https://dev.to/renhiyama/no-build-required-reeact-framework-38m</guid>
      <description>&lt;p&gt;Ever Considered why do need to download such a large &lt;code&gt;node_modules&lt;/code&gt; file for Next.js , RemixJS, and other frameworks? Just why do they need to download over 100mb to 200mb of data just to build a website and deploy it?&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%2Fg4niserjoejyttxc69ix.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%2Fg4niserjoejyttxc69ix.jpg" alt="Yes I am talking about this meme" width="800" height="575"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well, You probably didn't. You have access to the latest PCs and servers, and you don't even need to wait to run your &lt;code&gt;npm i&lt;/code&gt; ... Well again, its not your fault; you just don't simply care about it. But a lot of developers don't have access to these resources, and so they end up writing static HTML, or a barebones create-react-app without any good functionality. If you do think you are one of the developers who don't have a decent PC to start your web dev journey, you're at the right place my friend!&lt;/p&gt;

&lt;h2&gt;
  
  
  Meet Ree.js
&lt;/h2&gt;

&lt;p&gt;What is it? Just a lightweight framework? Hell nah, it's packed with lot more goodies that you didn't imagine you could use so much less storage!&lt;br&gt;
Reejs weighs less than 300kb, at the time of writing (and nearly 2mb if you use the default template, download their dependencies, and turn on Terser Minification!)&lt;/p&gt;
&lt;h3&gt;
  
  
  What's more?
&lt;/h3&gt;

&lt;p&gt;Ever Heard of URL Imports? If you didn't, here's the long story short: No more NPM. Just straight away importing from a url.&lt;br&gt;
A good example would be like this:&lt;/p&gt;

&lt;p&gt;Instead of doing this the classic boring and bloated/slow way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i react
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And this in &lt;code&gt;index.js&lt;/code&gt;&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="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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You write:&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="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;https://esm.sh/react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And to add more cherry on top, your same codebase which uses URL Imports, can be ran on browser, without BUILDING! Yes you heard it right!&lt;/p&gt;

&lt;h2&gt;
  
  
  Any more features?
&lt;/h2&gt;

&lt;p&gt;While Reejs is still in its infancy, it's trying to accomplish every pros of Nextjs, RemixJS and other Frameworks, except removing their cons (ie. building and huge installation size)&lt;/p&gt;

&lt;p&gt;As of now, Reejs ships with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Twind v1 as its primary CSS engine, with support for SSR CSS generation (beta support thanks to &lt;a href="https://github.com/sastan" rel="noopener noreferrer"&gt;Sastan&lt;/a&gt; the maintainer of twind)&lt;/li&gt;
&lt;li&gt;Minifier for HTML, CSS, and JS (Thanks to Terser for being... uh... lightweight? 400kb and its quite good and fast so... you know 😉)&lt;/li&gt;
&lt;li&gt;URL Imports (we welcome PRs and Issues over &lt;a href="https://github.com/rovelstars/reejs" rel="noopener noreferrer"&gt;https://github.com/rovelstars/reejs&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;REX Mode; An automated server engine that knows when to render CSR and SSR based on real life usage (still wip)&lt;/li&gt;
&lt;li&gt;No Builds I guess?&lt;/li&gt;
&lt;li&gt;ReeBlaze 🥏 A fast yet powerful router to take the whole website CSR!&lt;/li&gt;
&lt;li&gt;A good CLI because you deserve it!&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Please do note Reejs is in v0 (and v0.3.x to be more specific at the time of writing this) and so we are looking for issues for bug reports, and feature requests over our github repo.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Roadmap:
&lt;/h3&gt;

&lt;p&gt;Please note this are not in order, and its mostly like to be added, but please bear in mind that there's no ETA and if they require building, we would discontinue that feature.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Image Optimization&lt;/li&gt;
&lt;li&gt;Auto Head Updation&lt;/li&gt;
&lt;li&gt;Some Updates to ReeBlaze to allow more configs&lt;/li&gt;
&lt;li&gt;Reewrite Server to allow serverless deployment&lt;/li&gt;
&lt;li&gt;Not "vendor lock in" for nodejs environments, allow Deno and Bun to run Reejs&lt;/li&gt;
&lt;li&gt;Use a custom Reeact.js implementation that is more lightweight (1kb approx.)&lt;/li&gt;
&lt;li&gt;And a lot more!&lt;/li&gt;
&lt;li&gt;A good docs that's built on top of Reejs itself!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  So what are you waiting for?
&lt;/h3&gt;

&lt;p&gt;Consider Using Reejs in your future projects! Its stable enough by the way 😏&lt;br&gt;
Also you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Star Our Repo at &lt;a href="https://github.com/rovelstars/reejs" rel="noopener noreferrer"&gt;https://github.com/rovelstars/reejs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Join Our Discord Server at &lt;a href="https://dscrdly.com/server" rel="noopener noreferrer"&gt;https://dscrdly.com/server&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

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