<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by janu lius on Medium]]></title>
        <description><![CDATA[Stories by janu lius on Medium]]></description>
        <link>https://medium.com/@janu.lius021?source=rss-1ce51812da00------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*iQjrYnSEJTEUVNd0uEnO5g.jpeg</url>
            <title>Stories by janu lius on Medium</title>
            <link>https://medium.com/@janu.lius021?source=rss-1ce51812da00------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 10:37:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@janu.lius021/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Simple QR Code Reader in SolidJS]]></title>
            <link>https://medium.com/ralali-engineering/simple-qr-code-reader-in-solidjs-744ac7ac3435?source=rss-1ce51812da00------2</link>
            <guid isPermaLink="false">https://medium.com/p/744ac7ac3435</guid>
            <category><![CDATA[solidjs]]></category>
            <category><![CDATA[qrcodereader]]></category>
            <dc:creator><![CDATA[janu lius]]></dc:creator>
            <pubDate>Mon, 22 Aug 2022 08:16:12 GMT</pubDate>
            <atom:updated>2022-08-22T08:16:12.482Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I6rw_2h-j_Fg2eZGvHw5Lg.png" /></figure><p>This post is for those interested in implementing a QR Code scanner into your app using Solid as the front end. This tutorial creates a QR Code scanner without using the npm package.</p><h3>Create solid project</h3><p>To run Solid, make sure you have <a href="https://nodejs.org/">Node.js</a> installed. Then, run one of these commands.</p><pre>npx degit solidjs/templates/js simple-solid-qr-reader<br>cd simple-solid-qr-reader<br>npm install<br>npm run dev</pre><p>If you get an error like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SculNSfi1gz_fZ66szWX9g.png" /></figure><blockquote>Change Node.js version to <strong>v16.0.0</strong> or <strong>v14.18.0. node:</strong> import support added in <strong>v16.0.0</strong>, <strong>v14.18.0</strong>. <a href="https://nodejs.org/api/esm.html#node-imports">Check here</a>.</blockquote><p>After successfully installed, open it using your favorite editor. It will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*IF9ZvsgnG5QCJb100peJmQ.png" /></figure><h3>Create a component</h3><p>Create a QrReader.jsx File and add a &lt;video/&gt; tag with an id and other attributes in the src folder with the following:</p><pre>function QrReader() {<br>  return (<br>    &lt;video id=&quot;video&quot; width=&quot;640&quot; height=&quot;480&quot; autoplay&gt;&lt;/video&gt;<br>  )<br>}<br><br>export default QrReader</pre><p>Next, we will select the video element from the component we just created and check if there is a camera available that we can use to stream:</p><pre>import { onMount } from &#39;solid-js&#39;<br><br>let videoEl = null<br><br>function QrReader() {<br>  onMount(() =&gt; {<br>    videoEl = <strong><em>document</em></strong>.querySelector(&#39;#video&#39;)<br>    if (<strong><em>navigator</em></strong>.mediaDevices?.getUserMedia) {<br>      const constraints = {<br>        video: true,<br>        audio: false<br>      }<br>      <strong><em>navigator</em></strong>.mediaDevices.getUserMedia(constraints).then(stream =&gt; videoEl.srcObject = stream);<br>    }<br>  });<br><br>  return (<br>    &lt;video id=&quot;video&quot; width=&quot;640&quot; height=&quot;480&quot; autoplay&gt;&lt;/video&gt;<br>  )<br>}<br><br>export default QrReader</pre><p>Add Qr Reader component to src/App.jsx</p><pre>import styles from &#39;./App.module.css&#39;<br>import QrReader from &#39;./QrReader&#39;<br><br>function App() {<br>  return (<br>    &lt;div class={styles.App}&gt;<br>      &lt;h1&gt;QR Code Scanner&lt;/h1&gt;<br>      &lt;QrReader /&gt;<br>    &lt;/div&gt;<br>  )<br>}<br><br>export default App</pre><p>Now, if you open the browser, you will see a live video stream that we can use to scan QR codes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a-gJ_MGgyyjyKDjutSZ2RQ.png" /></figure><h3>Barcode scanner functionality</h3><p>Next, we will use BarcodeDetector, the interface of the Barcode Detection API. First, create a new BarcodeDetector class. Now we have BarcodeDetector class for making the barcode detector function. To start detecting barcodes we use the BarcodeDetector.detect() and run detect code function every 500 milliseconds.</p><blockquote>For more detail about BarcodeDetector, <a href="https://developer.mozilla.org/en-US/docs/Web/API/BarcodeDetector">check here</a>.</blockquote><p>Now src/QrReader.jsx is like this:</p><pre>import { onMount, onCleanup } from &#39;solid-js&#39;<br><br>let videoEl = null<br><br>function QrReader() {<br>  const barcodeDetector = new BarcodeDetector({ formats: [&#39;qr_code&#39;] })<br><br>  const detectCode = () =&gt; {<br>    if (videoEl?.srcObject) {<br>      barcodeDetector.detect(videoEl).then(codes =&gt; {<br>        if (codes.length === 0) return<br><br>        for (const barcode of codes)  {<br>          alert(barcode.rawValue)<br>        }<br>      }).catch(err =&gt; {<br>        <strong><em>console</em></strong>.error(err)<br>      })<br>    }<br>  }<br><br>  onMount(() =&gt; {<br>    videoEl = <strong><em>document</em></strong>.querySelector(&#39;#video&#39;)<br>    <br>    if (<strong><em>navigator</em></strong>.mediaDevices?.getUserMedia) {<br>      const constraints = {<br>        video: true,<br>        audio: false<br>      }<br><br>      <strong><em>navigator</em></strong>.mediaDevices.getUserMedia(constraints).then(stream =&gt; videoEl.srcObject = stream)<br>    }<br>  })<br><br>  const timer = setInterval(detectCode, 500)<br>  onCleanup(() =&gt; clearInterval(timer))<br><br>  return (<br>    &lt;video id=&quot;video&quot; width=&quot;640&quot; height=&quot;480&quot; autoplay&gt;&lt;/video&gt;<br>  )<br>}<br><br>export default QrReader</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PKrMij1nU6EiBJ3GRgcIDg.png" /></figure><h3>Additional</h3><p>Now, if we want to display recently scanned, then there are two files to be improved.</p><ul><li>src/QrReader.jsx</li><li>src/App.jsx</li></ul><p>First, in the src/App.jsx file, add the detect prop used to get the value of the scanned QR, and then save the scanned deal into the state.</p><pre>import styles from &#39;./App.module.css&#39;<br>import QrReader from &#39;./QrReader&#39;<br>import { createSignal, For } from &#39;solid-js&#39;<br><br>function App() {<br>  const [recentlyScanned, setRecentlyScanned] = createSignal([])<br><br>  return (<br>    &lt;div class={styles.App}&gt;<br>      &lt;h1&gt;QR Code Scanner&lt;/h1&gt;<br>      &lt;div class={styles.QrReaderWrapper}&gt;<br>        &lt;QrReader onDetect={<br>          (barcode) =&gt; {<br>            if (barcode) {<br>              setRecentlyScanned((recentlyScanned) =&gt; [...recentlyScanned, barcode.rawValue])<br>            }<br>          }}<br>        /&gt;<br>        &lt;div&gt;<br>          &lt;h2&gt;Recently Scanned&lt;/h2&gt;<br>          &lt;ul&gt;<br>            &lt;For each={recentlyScanned()}&gt;<br>              {(scanValue) =&gt; {<br>                return (<br>                  &lt;li&gt;<br>                    {scanValue}<br>                  &lt;/li&gt;<br>                )<br>              }}<br>            &lt;/For&gt;<br>          &lt;/ul&gt;<br>        &lt;/div&gt;<br>      &lt;/div&gt;<br>    &lt;/div&gt;<br>  )<br>}<br><br>export default App</pre><p>Add the code below in the src/App.module.css file.</p><pre>...<br>.QrReaderWrapper {<br>  display: flex;<br>  column-gap: 1rem;<br>}</pre><p>Finally, change the code below in the src/QrReader.jsx file.</p><pre>...<br>function QrReader(props) {<br>  ...<br>  const detectCode = () =&gt; {<br>    if (videoEl?.srcObject) {<br>      barcodeDetector.detect(videoEl).then(codes =&gt; {<br>        if (codes.length === 0) return<br><br>        for (const barcode of codes)  {<br>          props.onDetect(barcode)<br>        }<br>      }).catch(err =&gt; {<br>        <strong><em>console</em></strong>.error(err)<br>      })<br>    }<br>  }<br>...</pre><p>Now you will see recently scanned in your browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S1M1UDAgqB1G2W-ificu4Q.gif" /></figure><h3><strong>Source code</strong></h3><p>You can find the source code for this tutorial on Github: <a href="https://github.com/janulius/simple-solid-qr-reader">https://github.com/janulius/simple-solid-qr-reader</a>.</p><h3>Reference</h3><ul><li><a href="https://www.solidjs.com/guides/getting-started">https://www.solidjs.com/guides/getting-started</a></li><li><a href="https://nodejs.org/api/esm.html#node-imports">https://nodejs.org/api/esm.html#node-imports</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/BarcodeDetector">https://developer.mozilla.org/en-US/docs/Web/API/BarcodeDetector</a></li></ul><p><em>My name is Janulius. I am a Frontend Engineer at ralali.com. If this post is helpful, please recommend and share it! Thanks for your time.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=744ac7ac3435" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ralali-engineering/simple-qr-code-reader-in-solidjs-744ac7ac3435">Simple QR Code Reader in SolidJS</a> was originally published in <a href="https://medium.com/ralali-engineering">Ralali Tech Stories</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Essential Meta Tags for Search Engines]]></title>
            <link>https://medium.com/ralali-engineering/the-essential-meta-tags-for-search-engines-d40ba79d666d?source=rss-1ce51812da00------2</link>
            <guid isPermaLink="false">https://medium.com/p/d40ba79d666d</guid>
            <category><![CDATA[search-engines]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[content]]></category>
            <dc:creator><![CDATA[janu lius]]></dc:creator>
            <pubDate>Fri, 26 Mar 2021 09:55:41 GMT</pubDate>
            <atom:updated>2021-03-26T09:55:41.152Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*KSNpu3BZYOOZE-20" /></figure><p>Have you ever created a website application, but after you release and search on search results pages such as google, bing. But doesn’t match the snippet (<strong>title</strong> and <strong>description</strong>) you expect?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wd1Z_f1Kw7sc-B-RVrkOpA.png" /></figure><p>That is why it is essential to install and improve meta tags on a website page.</p><p>Meta tags are snippets of code used to inform search engines about important information on your web page, such as title, description, author, keywords, etc.</p><p>This article will explain how to use and tips the three most important meta tags for <strong>SEO</strong>(Search Engine Optimization).</p><ol><li><strong>Meta title</strong></li><li><strong>Meta description</strong></li><li><strong>Meta keyword</strong></li></ol><p><em>Note: Other meta tags help SEO, such as meta robots, meta refresh, meta charset, meta viewport, but we will not cover them in this article.</em></p><h3>Meta Title</h3><p>The title tag is the tag that contains the title that will appear on the search results page. An example of the title that will appear on the search results page can be seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pZNSuPY1BtRluClb" /></figure><h4>Code sample</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a9f54d03bf885d199e32d37a0faa39f8/href">https://medium.com/media/a9f54d03bf885d199e32d37a0faa39f8/href</a></iframe><h4>Why is it important?</h4><ul><li>The part that search engines will use to understand a page.</li><li>As one of your website’s ranking factors, the title tag determines whether your page can be seen through keywords or not.</li><li>Can affect the CTR (Click through Rate) of pages in search engines.</li><li>MOZ <a href="https://moz.com/learn/seo/title-tag#:~:text=Meta%20title%20tags%20are%20a,and%20(3)%20social%20networks.">explains</a>.</li><li>Google <a href="https://developers.google.com/search/docs/advanced/appearance/good-titles-snippets">explains</a>.</li></ul><h4>Tips</h4><ul><li>The title must be under 60 characters because Google and other search engines usually only display 50–60 characters from the title.</li><li>Unique.</li><li>It contains important keywords and is not clickbait.</li></ul><p><strong>more tips can read in this article</strong>:</p><ul><li><a href="https://developers.google.com/search/docs/advanced/appearance/good-titles-snippets">https://developers.google.com/search/docs/advanced/appearance/good-titles-snippets</a>.</li><li><a href="https://ahrefs.com/blog/title-tag-seo">https://ahrefs.com/blog/title-tag-seo</a>.</li><li><a href="https://moz.com/learn/seo/title-tag">https://moz.com/learn/seo/title-tag</a>.</li></ul><h3>Meta Description</h3><p>The description meta tag is an HTML tag that contains a summary of a page. The meta description will appear at the bottom of the meta title on the search results page. An example of the description that will appear on the search results page is provided below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CSNCVqvHmBWI_Xs7" /></figure><h4>Code sample</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ac385ea33f3fe245bd4d15531eb36efd/href">https://medium.com/media/ac385ea33f3fe245bd4d15531eb36efd/href</a></iframe><h4>Why is it important?</h4><ul><li>Can affect the CTR (Click through Rate) of a page on a search engine, positively affecting a page’s ability to rank on a search engine.</li><li>The more interesting the content of the meta description, it can make a lot of people curious and finally go to your website.</li><li>Google <a href="https://developers.google.com/search/docs/advanced/appearance/good-titles-snippets">explains</a>.</li></ul><h4>Tips</h4><ul><li>The description must be under 160 characters because Google and other search engines usually only display a maximum of 160 characters.</li><li>Unique.</li><li>Summary of pages.</li></ul><p><strong>more tips can read in this article</strong>:</p><ul><li><a href="https://ahrefs.com/blog/meta-description">How to Write the Perfect Meta Description</a></li><li><a href="https://moz.com/learn/seo/meta-description">On-site Meta Description</a></li></ul><h3>Meta Keyword</h3><p>Meta keyword tags are HTML tags that contain keywords that will be processed by search engines so that your website is easily found on search engines.</p><p>Also, make sure to use keywords relevant to your content because Google and other search engines are very good at analyzing content, so you can’t just enter keywords.</p><p>Since I own a website, I want people who search for a frontend developer to find me. Then, I add “frontend” as a meta keyword.</p><h4>Code sample</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/52c543e70c99e4e860d20515b68ad1c4/href">https://medium.com/media/52c543e70c99e4e860d20515b68ad1c4/href</a></iframe><h4>Tips</h4><ul><li>The keywords must match your target.</li><li>Must be relevant to your website content.</li></ul><p>Moreover, I will write more articles to enrich this topic such as meta tags for social media, how to make a rich snippet on search engines, and how to make a featured snippet on search engines.</p><h3>Reference</h3><ul><li><a href="https://ahrefs.com/blog/seo-meta-tags">Meta Tags for SEO: A Simple Guide for Beginners</a></li><li><a href="https://whello.id/tips-digital-marketing/pengertian-dan-jenis-meta-tag">Pengertian dan Jenis Meta Tag Untuk SEO</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d40ba79d666d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ralali-engineering/the-essential-meta-tags-for-search-engines-d40ba79d666d">The Essential Meta Tags for Search Engines</a> was originally published in <a href="https://medium.com/ralali-engineering">Ralali Tech Stories</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>