<?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: Pontakorn Paesaeng</title>
    <description>The latest articles on DEV Community by Pontakorn Paesaeng (@pontakornth).</description>
    <link>https://dev.to/pontakornth</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%2F294856%2F29e0e77d-5524-4cb3-a17d-f99cb71f7cd9.jpg</url>
      <title>DEV Community: Pontakorn Paesaeng</title>
      <link>https://dev.to/pontakornth</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pontakornth"/>
    <language>en</language>
    <item>
      <title>I built a note taking app to practice React</title>
      <dc:creator>Pontakorn Paesaeng</dc:creator>
      <pubDate>Sun, 25 Jul 2021 13:19:39 +0000</pubDate>
      <link>https://dev.to/pontakornth/i-built-a-note-taking-app-to-practice-react-52am</link>
      <guid>https://dev.to/pontakornth/i-built-a-note-taking-app-to-practice-react-52am</guid>
      <description>&lt;p&gt;Original Thai version: &lt;a href="https://pontakorn.dev/blog/note-taking-app-with-react"&gt;https://pontakorn.dev/blog/note-taking-app-with-react&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am during university vacation right now so I am kinda free. I have no idea what to do next and just stumble upon Zustand from a discussion about state management tools. So, I decided that I would try to it with React.&lt;/p&gt;

&lt;h2&gt;
  
  
  Structure of Starnote
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;React&lt;/strong&gt;: Yeah, I use React to practice React. Actually, I wanted to try CSS-in-JS solution except there are too few components to even benefit from it. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS Module&lt;/strong&gt;: Since there is no benefit using CSS-in-JS library. I tried using CSS Module instead. At least, I don't have to worry about cascading and naming much.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vite&lt;/strong&gt;: I use Vite for all projects including React, Vue, or even Svelte. It's easy to setup things and it's fast to reload.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Zustand&lt;/strong&gt;: I found it from &lt;a href="https://dev.to/nickytonline/what-s-your-go-to-state-management-library-these-days-4kfe/comments"&gt;this thread&lt;/a&gt;. I am interested because it only uses React Hook and not wrapping components.&lt;/p&gt;

&lt;p&gt;I use TypeScript for this project because it is easier to find bug and TypeScript has better autocomplete.&lt;/p&gt;

&lt;h2&gt;
  
  
  Starnote Development
&lt;/h2&gt;

&lt;p&gt;It is a side project without plan to publish. The MVP version includes CRUD operations, Markdown support, syntax highlighting and saving to localStorage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0KyhR7PY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0qk3i9fjli9j4c3078q0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0KyhR7PY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0qk3i9fjli9j4c3078q0.png" alt="Starnote Project Structure" width="426" height="618"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;store/note.ts&lt;/strong&gt;: This is where I put Zustand store and code working with localStorage. It might be large but I think it's too small to separate into different files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TheSidebar and TheEditor&lt;/strong&gt;: I only use one component so I prefix them with "The". They both connect with Zustand directly.&lt;/p&gt;

&lt;p&gt;There is nothing interesting about development of Zustand enough to put on this blog. I want to write my own CSS so I didn't use WindiCSS or Tailwind. I use ReactMarkdown and ReactSyntaxHighlighter but not markdown editor. It's just a normal textarea.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8RtDC9DO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d9a6pgpkz858wezy3x6m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8RtDC9DO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d9a6pgpkz858wezy3x6m.png" alt="Starnote Preview Mode" width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Possible improvement
&lt;/h2&gt;

&lt;p&gt;If anyone tried to use Starnote with mobile, they wil find that it is not responsive yet. If there is anything to improve, I would try this one first. So, I can fully put live demo online.&lt;/p&gt;

&lt;p&gt;Also, I would like to implement online saving. Users would be able to edit their notes from anywhere. I don't focus on this part yet. If I get a chance to do, I might try either Firebase or Supabase to not having to write backend.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>react</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Do you use built-in terminal or terminal emulator?</title>
      <dc:creator>Pontakorn Paesaeng</dc:creator>
      <pubDate>Sun, 25 Jul 2021 06:05:22 +0000</pubDate>
      <link>https://dev.to/pontakornth/do-you-use-built-in-terminal-or-terminal-emulator-355l</link>
      <guid>https://dev.to/pontakornth/do-you-use-built-in-terminal-or-terminal-emulator-355l</guid>
      <description>&lt;p&gt;I just want to have a friendly discussion why someone use built-in terminal (VSCode Terminal, Intellij Terminal) or terminal emulator (Kitty, iTerm2, Terminal).&lt;/p&gt;

&lt;p&gt;I personally use built-in terminal more because it's more convenient for me.&lt;/p&gt;

</description>
      <category>watercooler</category>
      <category>discuss</category>
    </item>
    <item>
      <title>I built a Hugo template with WindiCSS</title>
      <dc:creator>Pontakorn Paesaeng</dc:creator>
      <pubDate>Thu, 24 Jun 2021 15:00:26 +0000</pubDate>
      <link>https://dev.to/pontakornth/i-built-a-hugo-template-with-windicss-29g9</link>
      <guid>https://dev.to/pontakornth/i-built-a-hugo-template-with-windicss-29g9</guid>
      <description>&lt;p&gt;Link: &lt;a href="https://github.com/pontakornth/hugo-with-windicss"&gt;https://github.com/pontakornth/hugo-with-windicss&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How did I build it?
&lt;/h2&gt;

&lt;p&gt;Hugo actually has some assets processing features such as SCSS and PostCSS. WindiCSS is also available as PostCSS module but the author said that it should be the &lt;a href="https://github.com/windicss/postcss-windicss"&gt;last resort&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;NPM script can actually run other command as well. I can use it to run &lt;code&gt;hugo&lt;/code&gt; command. The problem is CSS need to be generated along with Hugo dev server for good developer experience (DX).&lt;/p&gt;

&lt;h2&gt;
  
  
  npm-run-all comes to rescue
&lt;/h2&gt;

&lt;p&gt;I don't really remember where I know &lt;code&gt;npm-run-all&lt;/code&gt; in the first place. It is a package that allow you to run command in parallel or sequence. It is possible to run multiple command using &amp;amp;&amp;amp; in Unix-based system. However, it is not supported on Windows CMD.&lt;/p&gt;

&lt;h2&gt;
  
  
  WindiCSS config
&lt;/h2&gt;

&lt;p&gt;If you read the config files, you will see &lt;code&gt;extract&lt;/code&gt; field. It is a field that allow WindiCSS to include and exclude files from building. This feature allow WindiCSS to generate enough CSS to display things correctly but no additional unused CSS.&lt;/p&gt;

&lt;p&gt;I don't include anything besides basic template so you can build on your own without having to modify the theme or rebuild from scratch. I hope you enjoy building your site.&lt;/p&gt;

</description>
      <category>hugo</category>
      <category>windicss</category>
      <category>showdev</category>
    </item>
    <item>
      <title>I build a minimal Conway's Game of Life with JavaScript</title>
      <dc:creator>Pontakorn Paesaeng</dc:creator>
      <pubDate>Wed, 16 Jun 2021 04:46:51 +0000</pubDate>
      <link>https://dev.to/pontakornth/i-build-a-minimal-conway-s-game-of-life-with-javascript-8i3</link>
      <guid>https://dev.to/pontakornth/i-build-a-minimal-conway-s-game-of-life-with-javascript-8i3</guid>
      <description>&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/pontakornth/embed/wvJReey?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;It's minimal version I can come up with for now. Currently, starting positions of cells are hard coded. But, the game is working correctly.&lt;/p&gt;

&lt;p&gt;I wish to add a feature where I can toggle cell by clicking. I see why Conway's game of life become an example project for WASM with Rust. It's difficult to do it efficiently. For example, to change state of the grid, I created a whole new array just to store next state. It can be done more efficiently by storing change instead.&lt;/p&gt;

&lt;p&gt;The code is not really consistent for now. But, I will left it be because I need to reference it when I improve the code in another project.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>showdev</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>I made a 100 days of code blog</title>
      <dc:creator>Pontakorn Paesaeng</dc:creator>
      <pubDate>Wed, 12 May 2021 15:22:19 +0000</pubDate>
      <link>https://dev.to/pontakornth/i-made-a-100-days-of-code-blog-5fk0</link>
      <guid>https://dev.to/pontakornth/i-made-a-100-days-of-code-blog-5fk0</guid>
      <description>&lt;p&gt;Link: &lt;a href="https://100days-pontakorn.vercel.app/"&gt;https://100days-pontakorn.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before the challenge, I had little or no motivation to code after studying. So, I decided to take this challenge but not really strictn. I don't use 1 hour rule because it might prevent coding after getting tired by studying in university. There is a some kind of "pause period" because I needed to study for the final exam.&lt;/p&gt;

&lt;p&gt;Most projects are about frontend web development. Some of them are projects that related to the web development or can apply what I have learned from the project to the web. My goal is to practice and apply knowledge to improve myself for taking a job.&lt;/p&gt;

&lt;p&gt;The blog is currently built with Nuxt and Nuxt Content. It is a great stack for simple blog.I use WindiCSS for styling because it generate only CSS I used and it integrates well with Nuxt.&lt;/p&gt;

&lt;p&gt;I hope I can finish 100 days of code with myself improved significantly.&lt;/p&gt;

</description>
      <category>100daysofcode</category>
      <category>showdev</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Variable are named after its purpose, not the other way around</title>
      <dc:creator>Pontakorn Paesaeng</dc:creator>
      <pubDate>Mon, 09 Nov 2020 03:30:29 +0000</pubDate>
      <link>https://dev.to/pontakornth/variable-are-named-after-its-purpose-not-the-other-way-around-5ekg</link>
      <guid>https://dev.to/pontakornth/variable-are-named-after-its-purpose-not-the-other-way-around-5ekg</guid>
      <description>&lt;p&gt;&lt;em&gt;Original Thai Version here: &lt;a href="https://pontakornth.vercel.app/blog/we-defined-variable-name-not-program"&gt;https://pontakornth.vercel.app/blog/we-defined-variable-name-not-program&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It's common problems I found after teaching my friends and girlfriend basic programming. They tend to associate variable name with what is named. For example, &lt;code&gt;i&lt;/code&gt; is used as index althought &lt;code&gt;i&lt;/code&gt; is the value in &lt;code&gt;for i in a_list&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So I will show the snippet of running code but variables and functions name are not related to its purpose.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;math&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;slow_sort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a_list&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;star_platinum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a_list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="n"&gt;the_world&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;the_world&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;star_platinum&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;hermit_purple&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;the_world&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;star_platinum&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;jonathan_joestar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;a_list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;hermit_purple&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;jonathan_joestar&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;hermit_purple&lt;/span&gt;
        &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;jonathan_joestar&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;the_world&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;hermit_purple&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;star_platinum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;hermit_purple&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it's not familiar to you, it's fine. This is a snippet of binary search. As you see the variable is not related, to its purpose at all. However, it runs perfectly fine.&lt;/p&gt;

&lt;p&gt;To conclude, the variable name is not necessary related to its purpose but it should. When you are programming, you need to remember the purpose of the variable. Happy coding.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>general</category>
    </item>
    <item>
      <title>Any good project that's not a web</title>
      <dc:creator>Pontakorn Paesaeng</dc:creator>
      <pubDate>Thu, 21 May 2020 11:01:21 +0000</pubDate>
      <link>https://dev.to/pontakornth/any-good-project-that-s-not-a-web-15mo</link>
      <guid>https://dev.to/pontakornth/any-good-project-that-s-not-a-web-15mo</guid>
      <description>&lt;p&gt;Most of time I develop a web as a project and it's getting more boring. Even challenging project doesn't seem to be interesting now. By the way, I know other language such as Rust, Python and Go but I don't know what to program now. Feel free to recommend anything. I wish this post to be useful for everyone.&lt;/p&gt;

</description>
      <category>learntocode</category>
      <category>project</category>
    </item>
    <item>
      <title>Deno ฉบับรวบรัด</title>
      <dc:creator>Pontakorn Paesaeng</dc:creator>
      <pubDate>Sun, 17 May 2020 10:10:05 +0000</pubDate>
      <link>https://dev.to/pontakornth/deno-1kk0</link>
      <guid>https://dev.to/pontakornth/deno-1kk0</guid>
      <description>&lt;p&gt;ตอนนี้ Deno เวอร์ชัน 1.0 ก็ออกมาเรียบร้อยแล้ว จึงทำให้ได้รับความสนใจจากโปรแกรมเมอร์ในฐานะตัวรัน JavaScript ตัวอื่นนอกจาก NodeJS &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Deno คืออะไร&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Deno คือตัวรัน JavaScript อีกตัวนอกจาก NodeJs ใช้เอนจินต์ V8 เหมือนกัน Deno เขียนโดยใช้ภาษา Rust มีโครงสร้างไลบรารี่คล้าย ๆ กับภาษา Go นอกจากนี้ยังสามารถรัน TypeScript ในตัวได้ด้วย&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;จุดเด่นของ Deno&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Deno เป็นตัวรัน JavaScript ที่ตั้งค่าความปลอดภัยสูงสุดตั้งแต่ต้นเลย สคริปต์ต่าง ๆ จะใช้ระบบไฟล์ ต่อเน็ต อะไรก็ไม่ได้จนกว่าเราจะอนุญาต นอกจากนี้จะไม่มี node_module หรือ package.json แต่จะ import จาก url และไฟล์ภายในเครื่อง&lt;/p&gt;

&lt;p&gt;นอกจากนี้ Deno ก็มีตัว Debugger รวมถึง Formatter ในตัวอีกด้วย เรียกได้ว่าเครื่องมือครบครันกันทีเดียว&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;ตัวอย่าง&lt;/strong&gt;
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ดัดแปลงมาจาก https://deno.land/std/datetime&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;parseDate&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;https://deno.land/std/datetime/mod.ts&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;parseDate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;20-01-2020&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="s2"&gt;dd-mm-yyyy&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;จะเห็นได้ว่าเราใช้ Url ในการ import ไลบรารี่ ไฟล์ใน Url จะสามารถ cache ได้ครับ&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;ที่มาและแหล่งศึกษาเพิ่มเติม&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;ทาง Deno มีเว็บไซต์อย่างเป็นทางการที่ &lt;a href="https://deno.land"&gt;deno.land&lt;/a&gt; ครับ จะรวมคู่มือและเอกสารของตัว Deno เอง ส่วน standard library จะอยู่ในเว็บไซต์ &lt;a href="https://deno.land/std/"&gt;deno.land/std&lt;/a&gt; ครับ&lt;/p&gt;

</description>
      <category>deno</category>
      <category>javascript</category>
    </item>
    <item>
      <title>What I learned from using Svelte to create basic note taking app.</title>
      <dc:creator>Pontakorn Paesaeng</dc:creator>
      <pubDate>Thu, 30 Apr 2020 04:18:24 +0000</pubDate>
      <link>https://dev.to/pontakornth/what-i-learned-from-using-svelte-to-create-basic-note-taking-app-2097</link>
      <guid>https://dev.to/pontakornth/what-i-learned-from-using-svelte-to-create-basic-note-taking-app-2097</guid>
      <description>&lt;p&gt;&lt;em&gt;The code is store on &lt;a href="https://github.com/pontakornth/svelte-note"&gt;this repo&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;This is not production ready. It's not even linted.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I heard about Svelte that it is simple and good. So I decided to go through the tutorial and created a simple project base on knowledge I have. These are what I learned&lt;/p&gt;
&lt;h1&gt;
  
  
  Svelte is easy to setup.
&lt;/h1&gt;

&lt;p&gt;There are official &lt;a href="https://github.com/sveltejs/template-webpack"&gt;Webpack&lt;/a&gt; and &lt;a href="https://github.com/sveltejs/template"&gt;Rollup&lt;/a&gt; template. However, I used community created &lt;a href="https://github.com/DeMoorJasper/parcel-plugin-svelte"&gt;Parcel plugin&lt;/a&gt; as I am more familiar with Parcel.&lt;/p&gt;
&lt;h1&gt;
  
  
  Single file component is easy to pickup.
&lt;/h1&gt;

&lt;p&gt;I find that Svelte is easy to learn especially when you use Vue or Nuxt before. There is no need to declare a component. You can just declare a variable and used in template. This is convenient. You might still have to get used to label syntax and dollar sign for store.&lt;/p&gt;

&lt;p&gt;Condition and loop are represented by its block so it's similar to how you write other program&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;ol&amp;gt;
{#each pages as page (page.id)}
 &amp;lt;li&amp;gt;{page.name}&amp;lt;/li&amp;gt;
{/each}
&amp;lt;/ol&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Svelte syntax may cause false positive error in linting.
&lt;/h1&gt;

&lt;p&gt;I didn't lint the code this time but my VSCode validation report unused label and values even it's used in template. Store is used with dollar sign so it can trigger false positive on some linting program. You might want to use dedicated plugin for Svelte.&lt;/p&gt;

&lt;h1&gt;
  
  
  Reactivity may need additional work.
&lt;/h1&gt;

&lt;p&gt;Svelte's reactivity has a problem dealing with array and object update. If you use other methods than assignment, you need to &lt;a href="https://svelte.dev/tutorial/updating-arrays-and-objects"&gt;reassign variable to itself&lt;/a&gt;. It can lead to redundant code.&lt;/p&gt;

&lt;p&gt;This is my first time using Svelte. There are more things I need to learn. I don't know if I am going to use Svelte in next project but this is one of the tool I considered. Thanks for reading. Feel free to comment anything.&lt;/p&gt;

</description>
      <category>svelte</category>
      <category>learning</category>
      <category>web</category>
    </item>
    <item>
      <title>Any tips or example for using Firestore with MobX</title>
      <dc:creator>Pontakorn Paesaeng</dc:creator>
      <pubDate>Wed, 12 Feb 2020 12:24:41 +0000</pubDate>
      <link>https://dev.to/pontakornth/any-tips-or-example-for-using-firestore-with-mobx-1mh0</link>
      <guid>https://dev.to/pontakornth/any-tips-or-example-for-using-firestore-with-mobx-1mh0</guid>
      <description>&lt;p&gt;I am doing a NextJs app and I just need state management and Firestore intergration. Redux is too complicated for this job within time limit at the end of February.&lt;/p&gt;

&lt;p&gt;The last tutorial I found is using Firebase Realtime Database. The data is aleady on Firestore so I can't change that. I appreciate your support and thank you in advance.&lt;/p&gt;

&lt;p&gt;Also, it would be nice if you can help me to persist MobX state in localStorage.&lt;/p&gt;

</description>
      <category>help</category>
    </item>
    <item>
      <title>What exactly is big O, big Θ, big Ω ?</title>
      <dc:creator>Pontakorn Paesaeng</dc:creator>
      <pubDate>Wed, 15 Jan 2020 13:44:58 +0000</pubDate>
      <link>https://dev.to/pontakornth/what-exactly-is-big-o-big-big-4b7b</link>
      <guid>https://dev.to/pontakornth/what-exactly-is-big-o-big-big-4b7b</guid>
      <description>&lt;p&gt;I took a course at Khan Academy but I didn't understand it yet. I think understand these would improve my understanding of alorithms.&lt;/p&gt;

</description>
      <category>explainlikeimfive</category>
      <category>computerscience</category>
    </item>
  </channel>
</rss>
