<?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 Aimee on Medium]]></title>
        <description><![CDATA[Stories by Aimee on Medium]]></description>
        <link>https://medium.com/@aimee-liang?source=rss-3f01d37ce9bf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Aimee on Medium</title>
            <link>https://medium.com/@aimee-liang?source=rss-3f01d37ce9bf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 02:04:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aimee-liang/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[The 4 Principles of OOP — Part 2: Encapsulation]]></title>
            <link>https://aimee-liang.medium.com/the-4-principles-of-oop-part-2-encapsulation-bf43c7a6f26b?source=rss-3f01d37ce9bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf43c7a6f26b</guid>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Aimee]]></dc:creator>
            <pubDate>Mon, 28 Jun 2021 23:07:15 GMT</pubDate>
            <atom:updated>2021-06-28T23:07:15.736Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*w2whtDkN4Mu5BoFk" /><figcaption>Image Credits to <a href="https://www.pexels.com/photo/question-mark-illustration-356079/">Pixabay</a> at Pexels</figcaption></figure><h3>The 4 Principles of OOP — Part 2: Encapsulation</h3><p>In Part 1 of this series, we explored Inheritance, or the ability for objects to be able to retain certain properties and attributes from a parent. This differs depending on whether we’re using class inheritance with object-oriented languages, such as Python, Java, C++, Ruby, or prototypal, of which JavaScript is most famously an example.</p><p>In Part 2, I’ll be reviewing the second principle, <strong>encapsulation</strong>. As a reminder, there are four principles to Object Oriented Programming.</p><p><a href="https://stackify.com/oop-concept-for-beginners-what-is-encapsulation/">Thorben Janssen</a> defines encapsulation as “the idea of bundling data and methods that work on that data within one unit”. It does so by allowing <em>some</em> data and methods to be accessed through what it called <strong>information hiding</strong>. While it varies across the object-oriented programming languages, there are a number of methods that can be used to view and change data. Most commonly known are getter and setter methods. Getter methods “get” the information: they are able to read the data, but they cannot change the data. Setter methods “set” the information: they do not read the data, but have access to write/re-write the data.</p><p>In Ruby, there are also private methods, which are defined by prefacing the method with the word private before it. This ensures that the method is unique to the class, and can&#39;t be accessed by other classes.</p><p>Encapsulation in JavaScript, which is a prototypal language, is different. Let’s use the below as an example:</p><pre>let dog = {<br>  name: &quot;Max&quot;,<br>  age: 2,<br>  favorite_toy: &quot;Frisbee&quot;<br>}</pre><pre>console.log(dog[&quot;name&quot;]) /* this will return &quot;Max&quot; */</pre><p>We’ve instantiated a new dog object where the dog’s name is Max. Max’s favorite toy is a Frisbee. As we know, though, you can reassign values in JavaScript, so this will also work:</p><pre>let dog = {<br>  name: &quot;Max&quot;,<br>  age: 2,<br>  favorite_toy: &quot;Frisbee&quot;<br>}</pre><pre>console.log(dog[&quot;name&quot;]) /* this will return &quot;Max&quot; */<br>dog[&quot;name&quot;] = &quot;Charlie&quot;<br>console.log(dog[&quot;name&quot;]) /* this will return &quot;Charlie&quot; */</pre><p>Which is it then? Is the dog’s name Max, or is it Charlie?</p><p>JavaScript doesn’t use setter and getter methods like Object-Oriented languages do, because it allows for variables and objects to be reassigned its values. That’s why some solutions to address this might be:</p><ol><li>Using anonymous functions and closures. This prevents our data from being accessed by functions that are not within the scope, and the data as well as its values will be retained in memory for usage.</li><li>Our other option would be using constructors and the keyword this. By doing so, we&#39;re constructing a method or some sort of data, and the this points <strong>directly</strong> to what&#39;s within the scope of this function.</li></ol><p>By allowing us to determine whether we want our methods to get, set, allow for both, or allow for neither to be by another party, encapsulation (in Object-Oriented languages) gives us better control of our information. To address this, JavaScript offers its own unique approaches: we can use constructors and this, or use anonymous functions and closures to determine what, if anything, can and should be changed or read.</p><p>Please check out the below resources if you want to learn more about encapsulation. Next in this series will be <strong>abstraction.</strong></p><p><strong>Resources</strong></p><ul><li><a href="https://medium.com/@kmccurley/object-oriented-programming-encapsulation-polymorphism-inheritance-ebbe24051202">Object-Oriented Programming: Encapsulation, Polymorphism, Inheritance</a></li><li><a href="https://devblast.com/b/ruby-inheritance-encapsulation-polymorphism">Ruby Inheritance, Encapsulation and Polymorphism - Devblast</a></li><li><a href="https://stackify.com/oop-concept-for-beginners-what-is-encapsulation/">OOP Concept for Beginners: What is Encapsulation</a></li><li><a href="https://medium.com/javascript-scene/encapsulation-in-javascript-26be60e325b4">Encapsulation in JavaScript</a></li><li><a href="https://www.educba.com/encapsulation-in-javascript/">Encapsulation in JavaScript | How Encapsulation Works in JavaScript?</a></li><li><a href="https://www.freecodecamp.org/news/here-are-some-practical-javascript-objects-that-have-encapsulation-fc4c1a79c655/">Here are some practical JavaScript objects that have encapsulation</a></li><li><a href="https://www.geeksforgeeks.org/introduction-object-oriented-programming-javascript/">Introduction to Object Oriented Programming in JavaScript - GeeksforGeeks</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf43c7a6f26b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The 4 Principles of OOP — Part 1: Inheritance]]></title>
            <link>https://javascript.plainenglish.io/the-four-principles-of-oop-inheritance-cf11cb1944fb?source=rss-3f01d37ce9bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf11cb1944fb</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Aimee]]></dc:creator>
            <pubDate>Fri, 18 Jun 2021 18:33:02 GMT</pubDate>
            <atom:updated>2021-06-18T23:09:42.077Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Fpg_N3TZKQNoPbge" /><figcaption>Image credits to <a href="https://www.pexels.com/photo/person-coding-on-a-macbook-pro-4974912/">Olia Danilevich</a></figcaption></figure><h3>The 4 Principles of OOP — Part 1: Inheritance</h3><p>In part 1 of this series, I’ll be discussing two types of inheritance in programming: class and prototypal.</p><p>Inheritance is one of the four principles in Object-Oriented Programming, and OOP is a highly sought-after skill in software engineering. So, what is inheritance?</p><p>We know inheritance as something a previous generation may have passed on to us — perhaps you received something meaningful to remind you of your family. Something similar happens in programming as well.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl1KujYk6SnIqO0KNa%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fspongebob-season-4-spongebob-squarepants-l1KujYk6SnIqO0KNa&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2Fl1KujYk6SnIqO0KNa%2Fgiphy.gif%3Fcid%3D790b7611bb0659b001baa132cb24c9a5e6a24f566ab965b0%26rid%3Dgiphy.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/56f411065c42eb00ffff0abb9194d73d/href">https://medium.com/media/56f411065c42eb00ffff0abb9194d73d/href</a></iframe><p>In programming, inheritance is defined as “<a href="https://stackify.com/oop-concept-inheritance/">a mechanism where you can derive a class from another class for a hierarchy of classes that share a set of attributes and methods</a>”.</p><p>As an example, let’s say you had a Car object. This object will contain a blueprint of sorts. Your Car object might have a Park method, a Drive method, it might consist of four wheels and an engine. You then could create or construct a Toyota object. This Toyota object could inherit the four wheels and engine attributes, as well as the Park and Drive methods, but maybe your Toyota object is a blue color.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6ae66b09b7ae336d8dd29a66951cebce/href">https://medium.com/media/6ae66b09b7ae336d8dd29a66951cebce/href</a></iframe><p>The Car object is considered a parent class, because it contains attributes and methods other classes are inheriting. The Toyota object — and other objects that might inherit from the Car object — are called children classes.</p><p>JavaScript does not observe this, because it has prototypal inheritance.</p><p>How exactly, then, does prototypal inheritance work? When you create or construct a new object, it “inherits” properties and attributes from a parent class. This new object will actually have a <strong>__proto__</strong>property that points <strong>directly</strong> to those inherited properties and methods from its parent. <a href="https://medium.com/swlh/all-you-need-to-know-about-prototypal-inheritance-the-second-pillar-of-javascript-d8d851cd4509">Allan Sendagi</a> writes that we can use prototypal inheritance to “go up the prototype chain”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*sOTYI68Gf-qdU5OU1A-INA.png" /><figcaption>In this example, I instantiated a variable, newS, to the value of new String. When I console.log newS, the __proto__ property shows this is, in fact, a String (along with String methods)</figcaption></figure><p>Understanding Object-Oriented Programming, and subsequently its four principles, can be tremendously helpful whether you’re trying to get your first job or your next job as an engineer. There are many different types of inheritance even within class and prototypal inheritance. I used the below resources to learn more about the two types of inheritance referenced in this post. Please check them out if you’d like to learn more.</p><p>Next in this series, I’ll be diving into <strong>encapsulation</strong>, another principle in OOP.</p><h4>Resources</h4><ul><li><a href="https://medium.com/swlh/all-you-need-to-know-about-prototypal-inheritance-the-second-pillar-of-javascript-d8d851cd4509">All you need to know about Prototypal Inheritance — The second pillar of Javascript</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain">Inheritance and the prototype chain - JavaScript | MDN</a></li><li><a href="https://www.educative.io/blog/understanding-and-using-prototypal-inheritance-in-javascript">Understanding and Using Prototypical Inheritance in JavaScript</a></li><li><a href="https://stackify.com/oop-concept-inheritance/">OOP Concept for Beginners: What is Inheritance?</a></li><li><a href="https://medium.com/javascript-scene/3-different-kinds-of-prototypal-inheritance-es6-edition-32d777fa16c9">3 Different Kinds of Prototypal Inheritance: ES6+ Edition</a></li></ul><p><em>More content at </em><a href="http://plainenglish.io/"><em>plainenglish.io</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf11cb1944fb" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/the-four-principles-of-oop-inheritance-cf11cb1944fb">The 4 Principles of OOP — Part 1: Inheritance</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Know When to Use Redux]]></title>
            <link>https://javascript.plainenglish.io/how-to-know-when-to-use-redux-ab5a8b9bd657?source=rss-3f01d37ce9bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab5a8b9bd657</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Aimee]]></dc:creator>
            <pubDate>Thu, 10 Jun 2021 19:48:22 GMT</pubDate>
            <atom:updated>2021-06-11T11:12:47.431Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*12uZdOFUNMM3oWPE" /><figcaption>Image credits to <a href="https://www.pexels.com/photo/man-wearing-black-and-white-stripe-shirt-looking-at-white-printer-papers-on-the-wall-212286/">Startup Stock Photos</a></figcaption></figure><p>There are many blogs out there about <em>how</em> to use Redux, but few on <em>when</em> to use Redux. It can be difficult and tricky to discern, and something I’ve struggled with myself.</p><h4>What is Redux? Why was it created?</h4><p>Redux is a <strong>third-party library created by Dan Abramov and Andrew Clark for state management.</strong></p><p>For starters, state management is a complex challenge in Frontend Development. <a href="https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous/Introducing">JavaScript is asynchronous</a>, which means there can be many functions running in the background waiting to be completed, and we have no idea when they will be completed and returned.</p><p>When React was introduced, it came with a built-in state object through the use of class components. Over time, Redux was introduced to address state management. More specifically, it aims to make state more predictable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*opjaFycjRJ3OAafz.gif" /><figcaption>Image credits to Redux.JS</figcaption></figure><h4>(Briefly) How does Redux work?</h4><p>Redux needs to be installed into your project. The documentation can be found <a href="https://redux.js.org/introduction/getting-started/">here</a>, based on your needs.</p><p>State is contained in a <strong>store</strong> object, and here’s where its unique features come in. You might recall I mentioned earlier that Redux makes state more predictable. In fact, it does so by making the state object read-only: that is, we can read and display its values, but we can’t change or mutate state itself. That has to be done through actions. Actions tells our code what type of (for lack of a better word) action we want it to take. Reducers are functions that take in arguments, one being the action, that will return an updated state.</p><p>In addition, there are <strong>mapStateToProps</strong> and <strong>mapDispatchToProps</strong>, two functions that allow us to access and read state (the former) and change state (the latter). Disclaimer: it is not advisable to mutate state, so what we are actually doing with <strong>mapDispatch</strong> is copying state, mutating the copied version, and returning the newly mutated version.</p><h4>What are some drawbacks of using Redux?</h4><p>If you’re confused by what I briefly described, you’re not alone. Redux was intended to make it easier to manage and maintain state, but as you can see, there are quite a few things you need to build into your code with Redux.</p><p>More importantly, though, you may not need it. Dan Abramov wrote about this himself, saying that “local state is fine”. It’s easy to think that Redux will be needed if you’re starting an app and considering scalability.</p><h4>So how will I know?</h4><p>Unfortunately, there is no checklist I’ll be providing for you to identify whether you need Redux.</p><p>Start with making sure you understand React’s state management and data flow. What is the difference between local and global state? Does this component <em>need</em> access to state? What data, if any, needs to be passed down to this component?</p><p>Next, understand what Redux was built to address, and how it does so.</p><p>Then, evaluate the problem or situation. Redux shouldn’t be your first approach, in my opinion, especially since there are React Hooks, but it also shouldn’t be avoided. It’s a powerful and helpful library once you understand it. What does Redux offer to this approach, that useState and/or useContext does not, or cannot?</p><p>If you determine that local and global states aren’t sufficient, then Redux might be the way to go.</p><p>Redux is one of the most highly sought skills in frontend development. While understanding it is important, not every app might call for it. I hope this sheds some light on other approaches state can be managed. I found the below resources helpful when writing this piece, and thought you might as well.</p><h4>Resources</h4><ul><li><a href="https://en.wikipedia.org/wiki/Redux_(JavaScript_library)">Redux (JavaScript library) - Wikipedia</a></li><li><a href="https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367">You Might Not Need Redux</a></li><li><a href="https://medium.com/rexlabs/redux-is-dead-long-live-redux-745d0cb26423">Redux Is Dead, Long Live Redux</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous/Introducing">Introducing asynchronous JavaScript - Learn web development | MDN</a></li><li><a href="https://redux.js.org/introduction/getting-started/">Getting Started with Redux | Redux</a></li></ul><p><em>More content at </em><a href="http://plainenglish.io/"><em>plainenglish.io</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab5a8b9bd657" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/how-to-know-when-to-use-redux-ab5a8b9bd657">How to Know When to Use Redux</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Things Web Developers Should Know Before Using React Native]]></title>
            <link>https://javascript.plainenglish.io/building-with-react-native-23139cf4959?source=rss-3f01d37ce9bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/23139cf4959</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Aimee]]></dc:creator>
            <pubDate>Fri, 04 Jun 2021 17:01:57 GMT</pubDate>
            <atom:updated>2021-06-06T17:50:18.480Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nxlMGzT7QqvSQByM" /><figcaption>Image credits to <a href="https://www.pexels.com/photo/bokeh-photography-of-person-holding-turned-on-iphone-1440727/">Daria Shevtsova</a> at Pexels</figcaption></figure><p>Web development was my initial introduction into Software Engineering. In my journey to becoming a better engineer, however, I’ve challenged myself to learn more about Frontend Development. This meant understanding the differences between client and server side rendering, building a website incorporating UX trends, and incorporating React Hooks into my projects.</p><p>On that note, I recently built a project using React Native, an extension of React. React Native is an open source framework, and it is used for mobile Frontend development. If you have a solid foundation in React, then React Native won’t present too much of a learning curve, in my opinion. That said, there are a few key differences, which I experienced firsthand when building. Let’s dive into it.</p><h4>Getting started</h4><p>The first challenge I was faced with was testing. With web development, I was used to working with multiple screens to see how my code was rendered on the browser. I also frequently used the in-browser Chrome Dev Tools to style and log any errors. It’s pretty different on React Native — mainly because you’ve to test on your mobile device.</p><p>Here is where I’ll link the<a href="https://reactnative.dev/"> React Native docs</a> — I found them pretty helpful, and used Expo CLI to start and test my project. Expo is a great solution as alternative solutions to testing your project would be using Android emulators. Once you install and set up Expo on your local machine, and download the Expo app on your phone, so long as both devices are connected to the same WiFi, you’ll be able to see your work live!</p><h4>Ok, I’ve gotten started. What else?</h4><p>The next big difference I saw were React Native events. In React, and for web development in general, you have a few given events based on how the user interacts with the web. For example, when you click on something on the web, that might lead you to a new page or for something to play on YouTube. If you hover over an item, you might be able to see animations.</p><p>This is a little more difficult to replicate on a mobile device (once again, my opinion). On your mobile device, you’re usually pressing or swiping on your phone: you press to view something, to add an item to your cart, you swipe to view settings, etc. In fact, in React, you can pass in event, or e as a parameter for an event listener. You <strong>can’t</strong> do so in React Native. Rather, you have event listeners such as onChangeText, which handles updating text (or strings) for you.</p><h4>Styling</h4><p>React Native comes with a number of tags unique for mobile development. This includes &lt;View&gt;, &lt;Text&gt;, &lt;TextInput&gt;, and &lt;Image&gt;, which take the place of traditional HTML tags. In addition to predetermined components, you’ll have to import a StyleSheet to the components you’re looking to style. React Native does <strong>not</strong> allow for CSS.</p><h4>Other considerations</h4><p>In addition, there are many factors to consider when developing a mobile app. For me, this includes adjusting for the Keyboard. Perhaps, like me, you’ve taken it for granted that the Keyboard disappears after you type in something on your phone. Working on my app made me consider user interaction: did I want the Keyboard to disappear? How did I want a Component to appear in relation to the Keyboard?</p><p>React Native is a popular framework for mobile development. It’s fast to use and build with, and if you understand React or other Frontend frameworks, it’s relatively easy to pick up. That said, there is so much to learn and consider when it comes to mobile development.</p><h4>Resources</h4><ul><li><a href="https://reactnative.dev/">React Native · Learn once, write anywhere</a></li><li><a href="https://medium.com/@thinkwik/react-native-what-is-it-and-why-is-it-used-b132c3581df">React Native: What is it? and, Why is it used?</a></li></ul><p><em>More content at </em><a href="http://plainenglish.io/"><strong><em>plainenglish.io</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23139cf4959" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/building-with-react-native-23139cf4959">Things Web Developers Should Know Before Using React Native</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Server Side vs. Client Side Rendering]]></title>
            <link>https://aimee-liang.medium.com/server-side-vs-client-side-rendering-d6773ad896a7?source=rss-3f01d37ce9bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6773ad896a7</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Aimee]]></dc:creator>
            <pubDate>Thu, 27 May 2021 23:33:47 GMT</pubDate>
            <atom:updated>2021-05-29T01:01:34.587Z</atom:updated>
            <content:encoded><![CDATA[<h3>Server vs. Client Side Rendering</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SpfQ-vDzJ2MoSiSS" /><figcaption>Image credits to <a href="https://www.pexels.com/photo/black-screen-with-code-4164418/">Antonio Batinic</a> at Pexels</figcaption></figure><p>Recently, someone asked me about a React framework, and the benefits of choosing and using this particular framework. Truth be told, I wasn’t sure: I knew this framework loaded faster compared to other frameworks in the same space, but couldn’t explain it in more depth than that at the moment.</p><p>After this particular conversation, and a few more about Front End development, I wanted to focus my attention on the differences between server side rendering versus client side rendering, and the benefits of using either or.</p><h4>What is server side rendering?</h4><p>Server side rendering is one way of displaying a web page. This was how much of the Web worked until recently. This type of rendering utilizes HTML and CSS, converting it so the Web browser can understand it and display it. For a long time — in fact, since the Web was created — this was how web pages were displayed.</p><h4>What is client side rendering?</h4><p>Client side rendering is another way of displaying a web page. Rather than using static HTML and CSS, client side rendering utilizes JavaScript, which will run and display a web page. Using client side rendering has been relatively more recent, and gained popularity in Frontend Development.</p><h4>Benefits/Drawbacks to Server Side Rendering</h4><p>Pros</p><ol><li>Better SEO — web crawlers have an easier time with server side rendering, which can improve your website’s appearance in search results</li><li>Great for static sites — not every website needs to have interactive media or animations. If this is the case for you, perhaps having a website composed of HTML and CSS will work fine.</li><li>Initial page will load faster, compared to client side rendering</li></ol><p>Cons</p><ol><li>Not ideal for dynamic sites</li><li>Pages that are not the landing page may load slower</li><li>Many reloads — with server side rendering, you have to make frequent requests to the server to display new and/or different pages.</li></ol><h4>Benefits/Drawbacks to Client Side Rendering</h4><p>Pros</p><ol><li>Ideal for dynamic, interactive sites</li><li>Faster load times — in the event that you want your user to be directed to different pages, it will load much quicker than server side frameworks</li><li>Wide selection of various JavaScript libraries — more on this later!</li></ol><p>Cons</p><ol><li>Not great for SEO — web crawlers can have a more difficult time, which may result in your website’s appearance in search results</li><li>Slower initial load time for landing page</li><li>May require additional libraries</li></ol><p>For more on this, I recommend <a href="https://www.freecodecamp.org/news/what-exactly-is-client-side-rendering-and-hows-it-different-from-server-side-rendering-bd5c786b340d/">Cristian Vega’s blog</a> — Cristian clarified many of these points in their own work.</p><h4>What are some examples of client side frameworks?</h4><p>There are very many client side frameworks, including:</p><ol><li><a href="https://angularjs.org/">Angular.js</a></li><li><a href="https://vuejs.org/">Vue.js:</a></li><li><a href="https://reactjs.org/">React.js</a></li><li><a href="https://svelte.dev/">Svelte.js</a></li></ol><h4>What are some examples of server side frameworks?</h4><p>There are also a wide variety of server side frameworks to choose from, including:</p><ol><li>Next.js: Next.js is built on the React library. It’s a popular choice for developers given its quick rendering time. It also offers better SEO for your website.</li><li>Nuxt.js: Nuxt.js is built on the Vue library.</li><li>Nest.js: Nest.js is a Frontend framework, built on the Angular library.</li></ol><p>There are many benefits and drawbacks to both client side and server side rendering. As Frontend development continues to advance, it’s not hard to wonder what new frameworks will be created, and how it might change how we currently understand and interact with the Frontend.</p><p>For additional reading, please check out the resources below.</p><h4>Resources</h4><ul><li><a href="https://www.freecodecamp.org/news/what-exactly-is-client-side-rendering-and-hows-it-different-from-server-side-rendering-bd5c786b340d/">Client-side vs. server-side rendering: why it&#39;s not all black and white</a></li><li><a href="https://dev.to/seal125/what-is-server-side-rendering-22ik">What Is Server-Side Rendering?</a></li><li><a href="https://javascript.plainenglish.io/top-10-javascript-frameworks-for-server-side-development-in-2020-6d265016c02">Top 10 JavaScript Frameworks for Server Side Development in 2020</a></li><li><a href="https://yudhajitadhikary.medium.com/client-side-rendering-vs-server-side-rendering-in-react-js-next-js-b74b909c7c51">Client Side Rendering Vs Server Side Rendering in React js &amp; Next js</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks">Understanding client-side JavaScript frameworks - Learn web development | MDN</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6773ad896a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How does the Web work?]]></title>
            <link>https://aimee-liang.medium.com/how-does-the-web-work-b29581cebd1e?source=rss-3f01d37ce9bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b29581cebd1e</guid>
            <dc:creator><![CDATA[Aimee]]></dc:creator>
            <pubDate>Mon, 24 May 2021 20:01:04 GMT</pubDate>
            <atom:updated>2021-05-24T20:01:04.201Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SoCAuLKmYDUsvllj" /><figcaption>Image credits to <a href="https://www.pexels.com/photo/web-text-1591060/">Miguel Á. Padriñán</a> at Pexels</figcaption></figure><p>The internet is everywhere, or rather, we can access the internet (almost) everywhere. From the small computers we call mobile devices or “phones”, to smart watches, smart TVs, smart refrigerators, smart door alarms, to our laptops, it’s something we take for granted. We click or tap on an icon, type in an address, and will see a website in a matter of seconds, even milliseconds.</p><p>While this seems like all there is to it, it’s actually — surprise! — much more complicated. So…how <em>does</em> the internet work?</p><p>There’s an important distinction between the internet and the web. <a href="https://www.geeksforgeeks.org/whats-difference-internet-web/">GeeksForGeeks</a> distinguishes this by explaining that “the <em>Internet</em> is infrastructure while <em>The Web</em> is service on top of that infrastructure”. So when we talk about ethernet or WiFi, that’s the internet. If we’re talking about online shopping or sharing photos and videos, that’s the Web. So…how does the <em>Web </em>work?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F8VkgrPdxMh0oo%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fgraphic-web-premium-8VkgrPdxMh0oo&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2F8VkgrPdxMh0oo%2Fgiphy.gif%3Fcid%3D790b7611bc576570a06f20ae29d8e4bb1e572ddb4253f6d9%26rid%3Dgiphy.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/32ed81c981992f44ce225b2536e1929c/href">https://medium.com/media/32ed81c981992f44ce225b2536e1929c/href</a></iframe><p>Assuming your WiFi works fine and there are no issues with the Internet, when you go to your Web browser, more likely than not, you’ll type in an address you want to go to. For example, you’re reading this on Medium, so you may have typed in <a href="http://medium.com/">medium.com</a>. After pressing “return” or “enter”, you should see the page of the web address you’re trying to reach.</p><p>To begin, your laptop/phone/device is the <strong>client</strong>. As the client, you’re trying to view a webpage. The webpage is stored in a much larger computer. After all, it’s not the only webpage in that computer, and other people are trying to access that and/or other websites as well. That computer is a <strong>server</strong>. <a href="https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/How_the_Web_works">MDN</a> defines servers as “computers that store webpages, sites, or apps’’.</p><p>When you press return or enter, what happens next is the following:</p><p>Your device, the client, will look for where the server that hosts that website is located, using DNS. MDN provides an excellent analogy, where this initial check is similar to looking up the location of a shop or restaurant.</p><p>Next, it will send an HTTP request to that server that essentially asks, “Do you have space or room for an additional user?” It asks the server to allow the client access to the website. Extending that analogy, it’s similar to seeing if that shop or restaurant has room for you to drop by.</p><p>The server will respond with a message: if the server grants the client access, it’ll respond with a 200, or an ok. (“Sure! We have room for one more customer.” in this shop analogy). The client will be able to browse and interact with the website. If the server denies access, then it’ll generate an error, and the client will not see anything.</p><p>It’s truly fascinating that this communication between client and server happens in a matter of milliseconds, and how complex the infrastructure that has set up the Internet and the Web is. Please check out the below sources if you’re interested in learning more about the Web itself.</p><h4>Resources</h4><ul><li><a href="https://www.geeksforgeeks.org/whats-difference-internet-web/">What&#39;s difference between The Internet and The Web ? - GeeksforGeeks</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/How_the_Web_works">How the web works - Learn web development | MDN</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages">HTTP messages - HTTP | MDN</a></li><li><a href="https://www.digitalocean.com/community/tutorials/how-to-troubleshoot-common-http-error-codes">How To Troubleshoot Common HTTP Error Codes | DigitalOcean</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b29581cebd1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Floyd’s Tortoise and Hare Algorithm — for beginners]]></title>
            <link>https://aimee-liang.medium.com/floyds-tortoise-and-hare-algorithm-for-beginners-69750edf8196?source=rss-3f01d37ce9bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/69750edf8196</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Aimee]]></dc:creator>
            <pubDate>Thu, 06 May 2021 20:31:03 GMT</pubDate>
            <atom:updated>2021-05-06T20:31:03.777Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*65m-YbcnfQFLNybQ" /><figcaption>Image credits to <a href="https://www.pexels.com/photo/sand-water-animal-zoo-6722913/">Ella Wei</a> at Pexels</figcaption></figure><h3>Floyd’s Tortoise and Hare Algorithm — for beginners</h3><p>I’ve been brushing up on my algorithms by focusing on Leetcode Medium problems — or trying to, at least. I came across the Find the Duplicate Number question and learned about the Floyd’s Tortoise and Hare solution. It was a bit challenging to grasp, but with the help of some very useful art and re-reading the code, I decided to share how and why this particular algorithm is so helpful (and time efficient!)</p><pre>Given an array of integers <strong>nums</strong> containing <strong>n + 1 </strong>where each integer is in the range [1, n] inclusive. There is only <strong>one repeated number </strong>in <strong>nums</strong>, return <em>this repeated number</em>.</pre><h4><strong>First approach</strong></h4><p>My first thought was to iterate through this array, and use the JavaScript method indexOf. IndexOf returns the index of the element if it can be found. I thought if I could iterate through the array and indexOf does <strong>not</strong> return -1, it would mean the number is not unique and therefore return nums[i].</p><p>Spoiler alert: I did say this was my first approach! This approach did not work, and that’s because it returned the value at the nums array at the zeroth index. Since nums at the initial index (which is 0) is 1, it is technically true that it is not equal to -1, and so this code would return the first value that this is true.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yd6Jg-dLNYo3cC7w" /><figcaption>Proof that my initial approach doesn’t work!</figcaption></figure><h4><strong>Second approach</strong></h4><p>I took a second look at the constraints: we can’t modify the array and should be using constant O(1) time. Finally, I gave in and checked the solutions. To my surprise, I saw a number of solutions use something called <strong>Floyd’s Tortoise and Hare Algorithm</strong>.</p><p>Even after taking a look at their solution and watching a YouTube walkthrough, I didn’t understand how this approach was optimal. That’s when I came across <a href="https://dev.to/alisabaj/floyd-s-tortoise-and-hare-algorithm-finding-a-cycle-in-a-linked-list-39af">Alisa Bajramovic’s blog</a> post on Dev. I found it helpful, especially the diagram, but when I went back to my code, I was still confused.</p><pre>var findDuplicate = function(nums) {<br>  let tort = nums[0]<br>  let hare = nums[tort]</pre><pre>  while (tort !== hare){<br>    tort = nums[tort]<br>    hare = nums[nums[hare]]<br>  }<br>  <br>  tort = 0</pre><pre>  while (tort !== hare){<br>    tort = nums[tort]<br>    hare = nums[hare]<br>  }</pre><pre>  return hare<br>}</pre><h4><strong>The Basics</strong></h4><p>We start by instantiating two variables, tort and hare. Tort is assigned the value of the nums array at index 0, and hare is assigned the value of nums at tort, which is one ahead, so at index 1. While the value of tort does <strong>not</strong> equal the value of hare, tort is the value of the next element (which is where hare was previously), and hare is the value of nums at the third element, or rather two indices ahead.</p><p>Tort is then the value of 0.</p><p>While tort is <strong>not</strong> equal to hare, tort is assigned the value of nums at the tort index, and then hare is assigned the value of nums at the hare index.</p><p>At the end of the while loop, you’ll return the variable hare.</p><p>Using this algorithm, we begin with tort assigned the value of 1, and hare to the value of 3. Since 1 !== 3, tort is now the value of 3, and hare has the updated value of 2 since it is at index 3. Again, these are not equal. You’ll continue to go through the array until tort reaches the end of the array — and since hare is the same value at tort, we return hare, or the value of 2.</p><h4><strong>Runtime</strong></h4><p>This algorithm has a runtime of O(N), with the main factor that impacts runtime being the length of the array.</p><p>I’ve focused on building lately, and the focus on algorithms has been a great change of pace. These algorithms challenged me to consider different ways to achieve the solution — and it’s been even more challenging to find the optimal one! I’ve linked Alisa’s blog below, as I found the explanation and diagram helpful.</p><h4><strong>Resources</strong></h4><p><a href="https://dev.to/alisabaj/floyd-s-tortoise-and-hare-algorithm-finding-a-cycle-in-a-linked-list-39af">Floyd&#39;s Tortoise and Hare Algorithm: Finding a Cycle in a Linked List</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69750edf8196" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The State of Things]]></title>
            <link>https://aimee-liang.medium.com/the-state-of-things-575122378da4?source=rss-3f01d37ce9bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/575122378da4</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Aimee]]></dc:creator>
            <pubDate>Thu, 29 Apr 2021 16:32:44 GMT</pubDate>
            <atom:updated>2021-05-08T00:47:41.955Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GebNRfPi0NZkKa3A.png" /><figcaption>Image credits to <a href="https://reactjs.org/">React.js</a></figcaption></figure><p>This week, I received some valuable feedback on how to grow as a developer — and that’s to go back to the basics. I’ve been working with React as a Frontend library, and one of the most important features of React and any Frontend library is state management. There are a number of ways of managing state. In this blog, I’ll review three different methods to do so: useState, Redux, and useContext.</p><p><strong>State</strong> is one of three key features in React: state, components, and props. State is defined as “a built in object…which allows components to create and manage their own data” (<a href="https://www.freecodecamp.org/news/react-js-for-beginners-props-state-explained/">Egyi</a>). I like to think of state as an object that keeps track of how a user interacts with a component, and based on this behavior, may render or display certain information.</p><h4>useState</h4><p>The first method of state management is useState, a popular React Hook. This hook “allows you to have state variables in functional components” (LogRocket). useState “returns a stateful value, and a function to update it” (<a href="https://reactjs.org/docs/hooks-reference.html#usestate">ReactJS</a>). This Hook utilizes local state management. In order to maintain state and allow other components to have access to it, you need to pass it down as props. useState can change on re-render.</p><pre>import {useState} from &#39;react&#39;</pre><pre>export default function WelcomePage(){<br>  const [counter, setCounter] = useState(0)<br>  const increaseCounter = () =&gt; {<br>    setCounter(counter +1)<br>  }</pre><pre>  return (<br>    &lt;div&gt;<br>       &lt;h3&gt;I&#39;ve clicked on this button {counter} times&lt;/h3&gt;<br>       &lt;button onClick={increaseCounter}&gt;Click here&lt;/button&gt;<br>    &lt;/div&gt;<br>  )<br>}</pre><h4>useContext</h4><p>I wrote about <a href="https://javascript.plainenglish.io/putting-context-into-usecontext-5dbe77c276d1">useContext</a> previously, but useContext is another React Hook. Unlike useState, useContext is used to manage and maintain global state management. Once something is assigned to useContext, you can import useContext in any component. The benefit of the useContext hook is that this won’t change on re-render because it is set globally.</p><pre>import {useContext} from &#39;react&#39;</pre><pre>export const UserContext = React.createContext()</pre><pre>export default function WelcomePage(){</pre><pre>  const [userInfo, setUserInfo] = useState([])</pre><pre>  const fetchAPI = () =&gt; {<br>    fetch(&#39;https://localhost:3000/[your route here]&#39;)<br>      .then(response =&gt; response.json())<br>      .then(data =&gt; {<br>         setUserInfo(data)<br>           return data<br>       })<br>  }</pre><pre>  return (<br>    &lt;UserContext.Provider<br>       value={{fetchAPI}}<br>    &gt; </pre><pre>    {/* other data here */ }</pre><pre>    &lt;/UserContext.Provider&gt;<br>  )<br>}</pre><h4>Redux</h4><p>Redux is a React library created to manage state. It’s defined as “a predictable state container designed to help you write JavaScript apps that behave consistently across client, server, and native environments and are easy to test” (<a href="https://blog.logrocket.com/why-use-redux-reasons-with-clear-examples-d21bffd5835/">Ighodaro</a>). State is maintained through a store, and you can designate which components in your app have access to state — and which can change state, using reducers and actions.</p><p>There are many benefits to using Redux: it’s easy to debug, it makes state more predictable, and it’s helpful if you need your app to scale up. It is <strong>not, </strong>however, necessary for all React apps. In fact, Dan Abramov, the co-author of Redux, has said as much: “<a href="https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367">Come back to Redux if you find a real need for it, or if you want to try something new. But approach it with caution, just like you do with any opinionated tool</a>”.</p><p>Please check out the below resources to learn more about state management.</p><h4>Resources</h4><ul><li><a href="https://reactjs.org/docs/hooks-reference.html#usestate">Hooks API Reference - React</a></li><li><a href="https://blog.logrocket.com/a-guide-to-usestate-in-react-ecb9952e406c/">useState in React: A complete guide - LogRocket Blog</a></li><li><a href="https://blog.logrocket.com/why-use-redux-reasons-with-clear-examples-d21bffd5835/">Why use Redux? A tutorial with examples - LogRocket Blog</a></li><li><a href="https://redux.js.org/tutorials/essentials/part-1-overview-concepts#what-is-redux">Redux Essentials, Part 1: Redux Overview and Concepts | Redux</a></li><li><a href="https://redux.js.org/tutorials/essentials/part-1-overview-concepts">Redux Essentials, Part 1: Redux Overview and Concepts | Redux</a></li><li><a href="https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367">You Might Not Need Redux</a></li><li><a href="https://www.freecodecamp.org/news/react-js-for-beginners-props-state-explained/">React.js for Beginners - Props and State Explained</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=575122378da4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What are microservices?]]></title>
            <link>https://aimee-liang.medium.com/what-are-microservices-6571fd8f2bce?source=rss-3f01d37ce9bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/6571fd8f2bce</guid>
            <dc:creator><![CDATA[Aimee]]></dc:creator>
            <pubDate>Thu, 22 Apr 2021 23:31:08 GMT</pubDate>
            <atom:updated>2021-04-22T23:31:08.282Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*o1CmUOAoyviBrhMB" /><figcaption>Image credits to Pixabay at Pexels</figcaption></figure><p>I was first introduced to microservices when I saw it on a job posting. That led to this quick dive into what exactly microservices are, and how they’re used in regards to software development.</p><h4>What are microservices?</h4><p>Microservices is defined as “an architectural approach to building applications” (<a href="https://www.redhat.com/en/topics/microservices/what-are-microservices">Red Hat</a>). At the granular level, it is a “cloud native architectural approach in which a single application is composed of many loosely coupled and independently deployable smaller components, or services” (<a href="https://www.ibm.com/cloud/learn/microservices">IBM</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/0*bAweDRD2yq18aQZm" /><figcaption>Image Credits to <a href="https://www.redhat.com/en/topics/microservices/what-are-microservices">Red Hat</a>.</figcaption></figure><p><a href="https://www.techrepublic.com/article/microservices-a-cheat-sheet/">TechRepublic</a> says that “in the past, applications were developed using monolithic architecture, meaning that all the dependencies, subroutines, libraries, and necessary snippets of code had to be built into the app directly. If any one of those elements goes bad, the entire application can come crashing to a halt”.</p><p>In short, microservices emerged as an approach to solving for performance and scalability. In order to minimize potential issues with the application, certain components were broken down to make managing and maintaining the app easier.</p><p>This approach of breaking services down in order for better maintenance is not new; <a href="https://opensource.com/resources/what-are-microservices">OpenSource</a> explains that</p><blockquote>“there are other programming paradigms which address this same concept, such as Service Oriented Architecture (SOA). However, recent technology advances coupled with an increasing expectation of integrated “digital experiences” have given rise to a new breed of development tools and techniques used to meet the needs of modern business applications.”</blockquote><h4>Why are they popular?</h4><p>Microservices are a popular approach because “development teams are able to rapidly build new components of apps to meet changing business needs” (<a href="https://www.redhat.com/en/topics/microservices/what-are-microservices">Red Hat</a>).</p><p>Some of the benefits that come along with microservices are:</p><ol><li><strong>Scalability</strong> — “as demand for certain services grows, you can deploy across multiple servers, and infrastructures, to meet your needs” (<a href="https://www.redhat.com/en/topics/microservices/what-are-microservices">Red Hat</a>)</li><li><strong>Easy to deploy</strong> — “it no longer requires an act of Congress in order to change a line of code or add a new feature in application” (<a href="https://www.ibm.com/cloud/learn/microservices">IBM</a>)</li><li>“Developer independence — small teams work in parallel and can iterate faster than large teams” (<a href="https://opensource.com/resources/what-are-microservices">OpenSource</a>)</li></ol><h4>Who shouldn’t use microservices?</h4><p>Microservices is not the optimal approach for every team. Using microservices involves a number of challenges, including:</p><ol><li><strong>Testing and debugging</strong>: both are necessary factors in development, but can be more challenging especially with many teams and features that are looking to be added.</li><li><strong>Security</strong>: <a href="https://www.bmc.com/blogs/microservices-challenges-when-to-avoid/">Sudip Sengupta</a> writes that as “microservices are often deployed in cloud-based environments”, this can lead to “increased risk and loss of control and visibility of application components”.</li><li><strong>Complexity</strong>: essentially “a lot more services, created by a lot more teams, deployed in a lot more places” (<a href="https://www.ibm.com/cloud/learn/microservices">IBM</a>).</li></ol><p>Please feel free to give the below resources a read if you want to learn more about microservices and/or whether or not this is an approach you or your team might want to incorporate.</p><h4>Resources</h4><ul><li><a href="https://www.redhat.com/en/topics/microservices/what-are-microservices">What are microservices?</a></li><li><a href="https://azure.microsoft.com/en-us/solutions/microservice-applications/">Microservices on Azure - What Is Microservices | Microsoft Azure</a></li><li><a href="https://www.techrepublic.com/article/microservices-a-cheat-sheet/">Microservices: A cheat sheet</a></li><li><a href="https://www.ibm.com/cloud/learn/microservices">microservices</a></li><li><a href="https://opensource.com/resources/what-are-microservices">What are microservices?</a></li><li><a href="https://www.bmc.com/blogs/microservices-challenges-when-to-avoid/">Challenges of Microservices &amp; When To Avoid Them</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6571fd8f2bce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Many Effects of useEffect]]></title>
            <link>https://aimee-liang.medium.com/the-many-effects-of-useeffect-acf5013b5e14?source=rss-3f01d37ce9bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/acf5013b5e14</guid>
            <dc:creator><![CDATA[Aimee]]></dc:creator>
            <pubDate>Fri, 16 Apr 2021 22:31:49 GMT</pubDate>
            <atom:updated>2021-04-19T00:43:33.649Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LY_PWN87s5nTNLPz.png" /><figcaption>Image credits to <a href="https://levelup.gitconnected.com/handling-complex-form-state-using-react-hooks-76ee7bc937">Aditya Loshali</a> and freeCodeCamp</figcaption></figure><p>Another React Hook I’ve enjoyed learning and working with, aside from <a href="https://javascript.plainenglish.io/putting-context-into-usecontext-5dbe77c276d1">useContext</a>, is useEffect.</p><p>useEffect is a React Hook that mimics component lifecycles and provides this to functional components. In class components, you have life cycles such as componentDidMount() or componentDidUpdate(). Life cycles are used for the purpose of rendering and re-rendering the DOM based on component updates.</p><p>Similar to useContext, as the industry standard moves from class components to functional components, we still need a Hook to address this issue. useEffect is built for that purpose. In fact, the official React documentation says that the useEffect Hooks is like “<a href="https://reactjs.org/docs/hooks-effect.html">componentDidMount, componentDidUpdate, componentWillUnmount combined</a>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/0*pmkcIJdTIbpHrrFa.png" /><figcaption>Image credits to <a href="https://blog.logrocket.com/guide-to-react-useeffect-hook/">LogRocket</a></figcaption></figure><h4>How do you use it?</h4><p>The useEffect, like useContext, has to be imported into your component from React. In this case, a useEffect should be invoked after you declare your functional component, and before your return statement.</p><p>The Hook itself “can accept 2 parameters, [which are] a callback function…and dependencies array” (<a href="https://dev.to/olenadrugalya/basic-hooks-in-react-useeffect-4719">Olena Drygalya</a>).</p><pre>import {useEffect} from &#39;react&#39;</pre><pre>export default function TestCase(){<br>   useEffect(() =&gt; {<br>     /* your callback function goes here()*/<br>   }, [/* your dependency array goes here */])<br>}</pre><p>The first parameter, the callback function, is also known as a side effect. That’s because “we usually want to execute side effects after specific conditions, e.g., data has changed, a prop has changed, or the user first sees our component” (<a href="https://blog.logrocket.com/guide-to-react-useeffect-hook/">Sebastian Weber</a>).</p><p>The second parameter of a dependency array assures that the useEffect is only run or re-render if there are changes or mutations to the dependency array. More likely than not, you might’ve seen the dependency array assigned to the value of an empty array. This assures that the useEffect is invoked once.</p><p>React Hooks and functional components aren’t going anywhere — if anything, it seems like developers are pretty enthusiastic about using Hooks since their introduction. React Hooks does an equally, if not better, job than class components in terms of efficiency and readability as well, with less code doing the same work and logic.</p><p>If you haven’t used React Hooks or useEffect previously, are new to React, or want to learn more about Frontend development, I encourage you to give the below resources a read.</p><h4>Resources</h4><ul><li><a href="https://dev.to/nibble/what-is-useeffect-hook-and-how-do-you-use-it-1p9c">What is useEffect hook and how do you use it?</a></li><li><a href="https://dev.to/olenadrugalya/basic-hooks-in-react-useeffect-4719">Basic Hooks in React - useEffect()</a></li><li><a href="https://blog.logrocket.com/guide-to-react-useeffect-hook/">The last guide to the useEffect Hook you&#39;ll ever need - LogRocket Blog</a></li><li><a href="https://blog.webdevsimplified.com/2020-04/use-effect/">Everything You Need To Know About useEffect</a></li><li><a href="https://reactjs.org/docs/hooks-reference.html#useeffect">Hooks API Reference - React</a></li><li><a href="https://overreacted.io/a-complete-guide-to-useeffect/">A Complete Guide to useEffect - overreacted</a></li><li><a href="https://dmitripavlutin.com/react-useeffect-explanation/">A Simple Explanation of React.useEffect()</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=acf5013b5e14" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>