<?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: Leslie</title>
    <description>The latest articles on DEV Community by Leslie (@resurii14).</description>
    <link>https://dev.to/resurii14</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%2F551599%2Fd6d481f7-63e6-447c-85b0-c99443962367.jpg</url>
      <title>DEV Community: Leslie</title>
      <link>https://dev.to/resurii14</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/resurii14"/>
    <language>en</language>
    <item>
      <title>2021 Weeknotes 3</title>
      <dc:creator>Leslie</dc:creator>
      <pubDate>Sat, 16 Jan 2021 06:47:32 +0000</pubDate>
      <link>https://dev.to/resurii14/2021-weeknotes-3-5ab5</link>
      <guid>https://dev.to/resurii14/2021-weeknotes-3-5ab5</guid>
      <description>&lt;p&gt;🧠 This is a brain dump. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Development BTS&lt;/li&gt;
&lt;li&gt;React Hook Form | What to do with server-side responses&lt;/li&gt;
&lt;li&gt;Tree-shaking with Webpack5 and Material UI&lt;/li&gt;
&lt;li&gt;
Writing Brag Books &lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Development BTS
&lt;/h3&gt;

&lt;p&gt;I've just realized that the redux-form integration with material-ui components is not magical.. at all. I am currently moving to react-hook-form for another project. Why is it not as easy as before?? Not that it's more complicated.. it’s just that I feel like there are too many things to do. &lt;/p&gt;

&lt;p&gt;Soooo looking back at my old code, I've done a lot of customizations in my previous integration that made it easy to use from one project to another with little setup. I forgot these &lt;strong&gt;behind-the-scenes&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Now I need to do it again, except that I am not starting from scratch. Maybe I can just drop in the previous builds I made. Will see that later. 😝&lt;/p&gt;

&lt;p&gt;Update: Yep. Pretty much like that. Plus the designer wants to change the UX, so yea. Same Same but not really. 😅&lt;/p&gt;




&lt;h3&gt;
  
  
  React Hook Form | What to do with server-side responses
&lt;/h3&gt;

&lt;p&gt;Maybe I missed some examples in the docs, but it was hard to see how I &lt;strong&gt;should&lt;/strong&gt; incorporate server responses into my form. For example, success messages or server-side validation error messages. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Found these helpful links along the way:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/react-hook-form/react-hook-form/issues/566"&gt;Submit from outside the form / RHF Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.carlrippon.com/react-hook-form-server-validation/"&gt;Server-side validation / Carl Rippon&lt;/a&gt;. I like this site. Subscribed haha.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Tree-shaking with Webpack5 and Material UI
&lt;/h3&gt;

&lt;p&gt;I kept looking for a way to make my build smaller. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Material UI.&lt;/strong&gt; Found my code blowing up to like 900kb. Whyyyy. I was only using TextField, why do I have modal and popover. So I jumped into the code, and this component is more of a convenience wrapper. It's not just the normal text field, you can use it for select, etc. Plus, the lodash packages are killing me. I forgot if it's also material-ui, but proptypes kept creeping into the production build.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1: Make sure my webpack + babel + material UI setup is correct.
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;The bundle actually got a whole lot smaller. Lodash is not being loaded fully. But I still want to optimize what I can.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Step 2: Check other options.
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Check the gzipped version. Maybe it's not that bad.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Used the web-cli to get this working. The result's not bad at all. Everything was around 100kb (including react and other packages). &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Try making my own TextField but still using mui.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tried this. But hmm. Is it worth doing this? Stopped.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use another package that also implements material design like &lt;a href="https://github.com/material-components/material-components-web-components"&gt;Material Web Components&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There are ways to incorporate it into React but, again, is the effort worth it? And is it actually smaller?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Write my own? &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Nope. Not this time. 🤣&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Step 3: Decide.
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Went with #1. Will re-optimize next time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  More links:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://material-ui.com/guides/minimizing-bundle-size/"&gt;Material UI: Minimizing bundle size guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://survivejs.com/webpack/optimizing/build-analysis/"&gt;Webpack Build Analysis&lt;/a&gt;. Quite an extensive list. Ha. Real cool.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Writing Brag Books
&lt;/h3&gt;

&lt;p&gt;Because it's that season again, performance assessment.&lt;/p&gt;

&lt;p&gt;Common problems in presenting accomplishment reports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you don't remember things you did&lt;/li&gt;
&lt;li&gt;not writing down the impact of the action&lt;/li&gt;
&lt;li&gt;worrying about looking boastful&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thankfully, our new senior manager shared this: &lt;a href="https://jvns.ca/blog/brag-documents/"&gt;Julia Evans' Brag Documents Guide&lt;/a&gt;. There are guide questions at the end of the article. Helped me for last year's. Will continue to use this year, probably write down milestones every quarter at least? Yep.&lt;/p&gt;

</description>
      <category>devjournal</category>
    </item>
    <item>
      <title>the overengineer</title>
      <dc:creator>Leslie</dc:creator>
      <pubDate>Mon, 04 Jan 2021 15:04:15 +0000</pubDate>
      <link>https://dev.to/resurii14/the-overengineer-35fg</link>
      <guid>https://dev.to/resurii14/the-overengineer-35fg</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Kailan ka ba titigil?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A team mate asked me when I'll finally stop. He was referring to my seemingly never-ending refactors. &lt;/p&gt;




&lt;p&gt;The frontend landscape is always changing. You wake up, and there's two new frameworks or bundlers or "must-use" packages. Everything is changing constantly, and sometimes it's really tiring. And when I get tired of all the crazy stuff, I remember Chris. &lt;/p&gt;




&lt;p&gt;The cover image is &lt;a href="https://christianheilmann.com/"&gt;Chris Heilmann&lt;/a&gt; in JS Conf 2015. His &lt;strong&gt;Overboard.JS&lt;/strong&gt; talk continues to console me to this day. It's a reminder that I don't have to use every new and shiny thing right away! Actually, I may not have to use all of them. Or any of them.&lt;/p&gt;

&lt;p&gt;It's a matter of good judgment. And staying in this domain? It's a matter of passion.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>frontend</category>
      <category>devjournal</category>
    </item>
    <item>
      <title>return to react</title>
      <dc:creator>Leslie</dc:creator>
      <pubDate>Sat, 02 Jan 2021 07:26:59 +0000</pubDate>
      <link>https://dev.to/resurii14/return-to-react-5hp</link>
      <guid>https://dev.to/resurii14/return-to-react-5hp</guid>
      <description>&lt;p&gt;In 2020 most of my time was spent dealing with legacy systems revolving around jQuery. By the end of the year, I had my personal roadmap quite laid out for 2021, and migration to react is on top of the list.&lt;/p&gt;




&lt;p&gt;I started listing down the things I have to do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;list the new feature requirements &lt;/li&gt;
&lt;li&gt;check my current reactJS setup&lt;/li&gt;
&lt;li&gt;review reactJS changes and the packages I use&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Current setup:&lt;/strong&gt; reactJS + redux. To note, I'm using redux-form and redux-saga. I use this for my big dashboard projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;New setup:&lt;/strong&gt; reactJS, no redux. My new project does not need redux. I'm still in the process of redesigning, but this will probably be it. I will surely miss redux-saga though.&lt;/p&gt;




&lt;p&gt;Anyway, for now here are things I learned / checked out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;new form: &lt;a href="https://formik.org/"&gt;formik&lt;/a&gt; vs &lt;a href="https://github.com/final-form/react-final-form"&gt;react-final-form&lt;/a&gt;. I learned both and their APIs do look similar.&lt;/li&gt;
&lt;li&gt;validations: &lt;a href="https://github.com/jquense/yup"&gt;yup&lt;/a&gt;. Clean validation schemas. I haven't looked for something else though. So no comparisons.&lt;/li&gt;
&lt;li&gt;xhr: &lt;a href="https://github.com/sindresorhus/ky"&gt;ky&lt;/a&gt;. Based on the native fetch.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://react-query.tanstack.com/"&gt;react-query&lt;/a&gt;. Interesting, especially for data-heavy projects.&lt;/li&gt;
&lt;li&gt;new setup for &lt;a href="https://webpack.js.org/blog/2020-10-10-webpack-5-release/"&gt;webpack5&lt;/a&gt; and babel&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://enzymejs.github.io/enzyme/"&gt;enzyme&lt;/a&gt; vs &lt;a href="https://github.com/testing-library/react-testing-library"&gt;react-testing-library&lt;/a&gt;. Decided not to change my current setup using enzyme. At least not for now, because I just have too many other things to decide on.&lt;/li&gt;
&lt;li&gt;Learned &lt;a href="https://github.com/redux-saga/redux-saga/issues/1198"&gt;redux-saga can be used without redux&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lastly, &lt;a href="https://www.robinwieruch.de/categories/react"&gt;Robin Wieruch's tutorials&lt;/a&gt;. I first started truly learning reactJS through his ebooks. That was in 2017. Every time I want to brush up on my FE knowledge, I always visit his website.&lt;/p&gt;

</description>
      <category>react</category>
      <category>todayisearched</category>
      <category>devjournal</category>
    </item>
  </channel>
</rss>
