<?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 Amie Foster on Medium]]></title>
        <description><![CDATA[Stories by Amie Foster on Medium]]></description>
        <link>https://medium.com/@amie.n.foster?source=rss-a779dfcbfc19------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ICvu-9abcyuDaBxCmzL8Dg.jpeg</url>
            <title>Stories by Amie Foster on Medium</title>
            <link>https://medium.com/@amie.n.foster?source=rss-a779dfcbfc19------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 12:43:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amie.n.foster/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[Rails Cheat Sheet *beginner-friendly*]]></title>
            <link>https://medium.com/@amie.n.foster/rails-cheat-sheet-beginner-friendly-cbaafd1fd982?source=rss-a779dfcbfc19------2</link>
            <guid isPermaLink="false">https://medium.com/p/cbaafd1fd982</guid>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[cheatsheet]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[generator]]></category>
            <dc:creator><![CDATA[Amie Foster]]></dc:creator>
            <pubDate>Mon, 22 Nov 2021 19:50:05 GMT</pubDate>
            <atom:updated>2021-12-07T06:57:41.696Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*IxV8ywwSSoSUfMZ6RxA8aw.gif" /></figure><p>RAILS! Wow, what a language. I truly enjoyed this last phase of Flatiron School and understand all the hype behind Ruby on Rails.</p><p>If you’re anything like me, and you’re learning Rails for the first time you’re probably very confused by all the generators and terminal commands knowing what they do, and when to use them all. If that sounds like you, then never fear! This guide is here to the rescue.</p><p>These are just the basic commands I think you need to know to get started with rails. While there are many more, I think starting off with a few and then explaining that once you feel more confident is the best way to learn.</p><p>Let’s jump right in!</p><h3>Basic Rails Terminal Commands</h3><ol><li>rails s / rails server — starts your server</li><li>rails c / rails console — opens up the console to test your code</li><li>rails g / rails generator — lists all generators — creates things in your rails app</li><li>rails d / rails destroy — deletes the last generate command in your rails app</li><li>rails routes — shows ALL the routes in ALL controllers</li><li>rails routes -c ControllerName — shows all routes for a specific controller</li><li>rails db:migrate — runs migrations</li><li>rails db:seed — seeds your database</li><li>rails db:reset — drops the database and sets it up again</li><li>rails db:drop — clears the database</li><li>rails db:rollback — rolls everything back to the most recent migration</li></ol><h3>Rails Data Types</h3><ul><li>:boolean — True or False</li><li>:date — Year, Month, Day</li><li>:datetime — Both date and time</li><li>:decimal — Stored precision varies; good for exact math calculations</li><li>:float — Decimal numbers stored with fixed floating point precision</li><li>:integer — Whole numbers [-4, 0, 8, 153]</li><li>:primary_key — Identifies a row in your table</li><li>:reference — Not exactly a data type but this is used to create a foreign_key in a table</li><li>:string — Short text</li><li>:text — Long text</li><li>:time — Hours, Minutes, Seconds</li><li>:timestamp — Same as :datetime, usually with created_at/updated_at</li></ul><h3>Rails Controller Actions</h3><h4>GET</h4><ul><li>index — Displays ALL records</li><li>show — Displays a single record</li></ul><h4>POST</h4><ul><li>create — Creates a new record</li></ul><h4>PATCH/PUT</h4><ul><li>update — Updates an existing record</li></ul><h4>DELETE</h4><ul><li>destroy — Deletes an existing record</li></ul><h3>Rails Generators</h3><p><em>NOTE: Data type defaults to string</em></p><h4>Model Generator</h4><ul><li>rails g model <em>SingularName</em> <strong>attribute1</strong>:data_type <strong>attribute2</strong>:data_type</li><li>Creates Model and Migration file</li><li>Models will house associations, validations, class/instance methods</li></ul><h4>Migration Generator</h4><ul><li>rails g migration <em>CreateNameOfMigration</em> <strong>attribute1</strong>:data_type <strong>attribute2</strong>:data_type</li><li>The above notation will create a new migration with the included attributes</li></ul><p><strong>Updating Migrations</strong></p><ul><li>Migrations are how you update your table — add_column, remove_column, change_column. You can do this directly in the terminal by using the notations below.</li><li><strong>Add column</strong> — rails g migration <em>AddColumnNameToTableName</em> <strong>new_column_name1</strong>:data_type <strong>new_column_name2</strong>:data_type</li><li><strong>Remove Column</strong> — rails g migration <em>RemoveColumnNameFromTableName </em><strong>column_name</strong>:data_type</li><li><strong>Change column</strong> <strong>data type</strong> — rails g migration <em>ChangeColumnNameToDataType</em> <strong>column_name</strong>:new_data_type</li><li><strong><em>NOTE</em></strong><em>: If these are a little confusing then you can always create a new blank migration (named accordingly) and manually write out the changes in those files. Use the </em><a href="https://guides.rubyonrails.org/active_record_migrations.html"><em>Rails docs</em></a><em> as a reference.</em></li></ul><h4>Controller Generator</h4><ul><li>rails g controller <em>PluralName</em></li><li>Creates a controller file with the given name</li><li>By default will create a route in routes.rb with ALL CRUD actions</li><li>Controllers will house all CRUD action methods declared in routes.rb</li></ul><h4>Resource Generator</h4><ul><li>rails g resource <em>SingularName </em><strong>attribute1</strong>:data_type <strong>attribute2</strong>:data_type</li><li>Creates Model, Migration, Controller, and Views files and adds routes for all CRUD actions to routes.rb</li></ul><p>I hope this serves as a helpful tool for other Ruby on Rails beginners! These were the commands that I found myself using the most while learning, but there are many more out there so if you cant find what your looking for here don’t be afraid to Google! Drop a comment with any useful beginner commands I may have missed!</p><p>Thanks for reading!</p><h3>Lets connect on LinkedIn!</h3><p><a href="https://www.linkedin.com/in/amie-n-foster/">https://www.linkedin.com/in/amie-n-foster/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cbaafd1fd982" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swipe It Like It’s HOT]]></title>
            <link>https://medium.com/@amie.n.foster/swipe-it-like-its-hot-ad4d0882a97a?source=rss-a779dfcbfc19------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad4d0882a97a</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[tinder]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Amie Foster]]></dc:creator>
            <pubDate>Sun, 31 Oct 2021 22:34:25 GMT</pubDate>
            <atom:updated>2021-12-07T06:58:16.963Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CE2XFquP-Sjf5dPkHx8vtA.gif" /></figure><p>For my last project, my group and I decided to recreate a version of tinder where people could match with someone based on their pets! <em>(think room raiders but pets instead of rooms)</em> So once I got my backend up and running, and started working on the front-end design, I realized you can’t recreate a tinder app without the infamous <strong><em>swipe</em></strong>! I’m going to share with you how to implement a swiping feature that handles CRUD as well!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*-sor-B3vx_qkxTfBu3mSMw.gif" /><figcaption>Example of swipe implementation</figcaption></figure><p>Initially, I thought about using CSS and even a react hook called useSprings but then I stumbled upon an awesome npm package called <a href="https://github.com/3DJakob/react-tinder-card"><em>npm-react-tinder-card</em></a>.</p><p>This npm package is SO convenient and includes so much functionality!</p><h4>Now let&#39;s walk through how to use it</h4><ol><li>First, you&#39;re going to need to install it by running &gt;&gt; <em>npm install — save react-tinder-card &lt;&lt; in your terminal</em></li><li>Next, you&#39;re going to want to import TinderCard to the component file you want to use it in. &gt;&gt; <em>import TinderCard from ‘react-tinder-card’ &lt;&lt;</em></li><li>Now you&#39;re ready to set up your tinder card! all you need to do is wrap the jsx you&#39;d like to include on your card inside of the TinderCard Component (and of course have all of this inside of your component return).<em>&lt;TinderCard&gt; {&lt;h1&gt;insert jsx inside here&lt;/h1&gt;}&lt;/TinderCard&gt;</em></li><li>The last step is to add the “swipe” className to the TinderCard component.</li></ol><p><strong>Here is an example of what the code looks like altogether:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*2Pr8RUMRU0TiwLtJ9BARgA.png" /><figcaption>A basic example of TincerCard component code</figcaption></figure><p>GREAT! Now you have a tinder-like card that you can swipe in any direction! Wasn’t that easy?</p><p>Now, if you’d like to take it one step further you can use one of the ‘event listener’ style props included in the package. This is where you can add some CRUD! I’ll go over these features below but first, it is important to know that all of these extra features are <strong>props</strong>. So to implement them into your own project you can just declare them inside your TinderCard, on the element you&#39;d like to associate with it. Think of them like event listeners. If you want to click on an &lt;h1&gt; element and trigger a function you&#39;d say <em>&lt;h1 onClick(() =&gt; triggerThisFunction)&gt;Some Text&lt;/h1&gt;</em>. Here, you can use this same notation. Just replace <em>onClick</em> with whatever prop you&#39;d like to use!</p><h4><strong>onSwipe</strong></h4><ul><li>Callback will be executed when a swipe has been completed. It will be called with a single string denoting which direction the swipe was in: ‘left’, ‘right’, ‘up’, or ‘down’.</li><li><strong>EXAMPLE</strong>: o<em>nSwipe={(dir) =&gt; function(dir, id)}</em> This enables you to perform some action upon swiping right. It will send the direction (right, left, up, down) and whatever other information you&#39;d like to send, like an id. This would be a great place to do some CRUD! For example, if the direction is left then delete else save it to another database!</li></ul><h4>onCardLeftScreen</h4><ul><li>Callback that will be executed when a TinderCard has left the screen. It will be called with a single string denoting which direction the swipe was in: ‘left’, ‘right’, ‘up’, or ‘down’.</li><li><strong>EXAMPLE</strong>: <em>onCardLeftScreen={(dir) =&gt; function(dir, id)}</em> This prop is similar to the last one but it acts when the card has left the screen AFTER being swiped. This would be another great place to add in some CRUD.</li></ul><h4>preventSwipe</h4><ul><li>An array of directions for which to prevent swiping out of the screen. Valid arguments are ‘left’, ‘right’, ‘up’ and ‘down’.</li><li><strong>EXAMPLE</strong>: <em>preventSwipe={[up, down]} </em>This will prevent the cards from being able to be swiped up and down.</li></ul><h4>swipeRequirementType</h4><ul><li>What method to evaluate what direction to throw the card on release. ‘velocity’ will evaluate direction based on the direction of the swiping movement. ‘position’ will evaluate direction based on the position the card has on the screen like in the app tinder. If set to position it is recommended to manually set swipeThreshold based on the screen size as not all devices will accommodate the default distance of 300px and the default native swipeThreshold is 1px which most likely is undesirably low.</li></ul><h4>swipeThreshold</h4><ul><li>The threshold of which to accept swipes. If swipeRequirementType is set to velocity it is the velocity threshold and if set to position it is the position threshold. On native the default value is 1 as the physics works differently there. If swipeRequirementType is set to position it is recommended to set this based on the screen width so cards can be swiped on all screen sizes.</li></ul><h4>onSwipeRequirementFufilled</h4><ul><li>Callback that will be executed when a TinderCard has fulfilled the requirement necessary to be swiped in a direction on release. This in combination with onSwipeRequirementUnfulfilled is useful for displaying user feedback on the card. When using this it is recommended to use swipeRequirementType=’position’ as this will fire a lot otherwise. It will be called with a single string denoting which direction the user is swiping: ‘left’, ‘right’, ‘up’, or ‘down’.</li></ul><h4>onSwipeRequirementUnFufilled</h4><ul><li>Callback that will be executed when a TinderCard has unfulfilled the requirement necessary to be swiped in a direction on release.</li></ul><h4>restoreCard()</h4><ul><li>Restore swiped-card state. Unlike the others, this is not a prop. This function can be used if you want to undo a swiped-card.</li><li><strong>EXAMPLE</strong>: You have a back button that shows the last swiped card or you have a reset button. The promise is resolved once the card is returned.</li></ul><p>For the full documentation, you can find the npm package <a href="https://github.com/3DJakob/react-tinder-card">here</a>.</p><p>Now you’re ready to add some cool swiping features to your next project! I hope you found this helpful!</p><h4>Thanks for reading!</h4><h3>Lets connect on LinkedIn!</h3><p><a href="https://www.linkedin.com/in/amie-n-foster/">https://www.linkedin.com/in/amie-n-foster/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad4d0882a97a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flipping Out! How to create a card that flips with React and CSS]]></title>
            <link>https://medium.com/@amie.n.foster/flipping-out-how-to-create-a-card-that-flips-with-react-and-css-131dba54fc96?source=rss-a779dfcbfc19------2</link>
            <guid isPermaLink="false">https://medium.com/p/131dba54fc96</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[women-who-code]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Amie Foster]]></dc:creator>
            <pubDate>Sat, 09 Oct 2021 04:20:23 GMT</pubDate>
            <atom:updated>2021-12-07T06:59:02.258Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g9OHMjUYcss3K-XxsvUuMw.gif" /></figure><p>For my most recent project, I was instructed to make an app using React. I decided to go with a fun, light-hearted joke app where users could find and share jokes! Rather than have the setup and punchline displayed all at once, I knew I wanted something a bit more dramatic. I scoured the internet looking for a cool way to make the site more interactive. Cue, the card flip!!!</p><p>I’m going to walk you through that process and share what I learned along the way. Sometimes deciphering code and putting things into digestible language can be extremely difficult. But never fear! I have done all the translations so you don’t have to.</p><p><strong>Step 1: Make the card!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*jN7p6G0lFv7C8Afx3qSYvg.gif" /></figure><p><em>Here’s what we’ll need:</em></p><ol><li><em>Card container</em>— a div element containing all of the cards that we can use to provide styling and structure to our card layout. <strong><em>className=”card-grid’</em></strong></li><li><em>Individual cards </em>— this is where the individual content will appear probably using a .map() to render info in an array/object from whatever database or API you are using. <strong><em>className=’card’</em></strong></li><li><em>Within the cards themselves</em> — a div element with the <strong><em>className=’front’</em></strong> to hold the information that will be visible from the front of the card and another sibling div element with the <strong><em>className=’back’</em></strong> to hold, you guessed it, the information that will be visible on the backside.</li></ol><p><strong><em>NOTE</em></strong><em>: For my project, I am rendering the setup on the front and the punchline on the back but this can be adapted for many other uses: a quiz with question/answer options on the front and the correct answer on the back, a storefront with the item name/photo on the front and its description on the back, a recipe list with the name and picture on the front and ingredients/step-by-step instructions on the back, or even a simple memory game where the front is blank and the user needs to match photos on the back from memory. This can be used for so many things! The options are really endless!</em></p><p><strong>Step 2:</strong> <strong>Now we can focus on flipping the card. For this, were going to combine some CSS styling (via our super handy class names) and State.</strong></p><p>1. Let&#39;s start off by creating a state to hold our flip! We&#39;re going to create a state and set its default value to false.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*xZska9pC0ZYJIamWSmYYLA.png" /></figure><p>2. Now we need to be able to toggle the state of our flip between true and false. Let&#39;s first think about our flip. We want our flip state to be triggered by something. That is, there is going to be <strong>*SOME EVENT*</strong> that is going to change our state. For this example, were going to change our state (aka flip our card) when the card is clicked on. So, we can assume we&#39;re going to need an onClick event listener on our card to listen for the click and then jump into our toggle logic to switch from true to false.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*QcVWjpyCP0-1B0HWz1ZLfQ.png" /></figure><p>3. Now that we’ve added our event listener, let&#39;s add our logic to toggle our state. What we want is to take the current state and set it to the opposite. We can use the logical operator (!), which means not. Essentially what we&#39;re saying is “hey, set flip(using the setter function) to not flip (because flip is false by default, not flip is true).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*aOCJCImrFS18_zkBqXisLQ.png" /></figure><p>4. Now what we have this logic written out the last thing to do is figure out where it goes! Well, since we want to click <strong>anywhere</strong> on the card we can put it in the div that holds all of our information. In this case, we can add it to our div elements with the class name of “front” and “back”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*WCaSeh70wZyNHMCC8U12GA.png" /></figure><p>5. The last step that is related to the state is going to be changing our class name based on whether the card is flipped or not (if flipped is true or false). To do this we&#39;re going to edit our className=”card” to be a ternary. The logic here is asking <strong>“is the card flipped?”</strong>(aka: is the state of flip true?) IF IT’S TRUE, then make the class name “card flip” IF IT’S FALSE, keep the class name “card”. We can write this out with our ternary like this,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*DbnFVpqvT_kWOp7oELOfWg.png" /></figure><p><strong><em>NOTES</em></strong><em>:</em></p><ol><li><em>We need to add the onClick to both front and back so the user is able to flip the card back and forth!</em></li><li><em>You can add the event listener to specific elements on your card as well. It just means that the user will have to click on that specific element to flip it. This is helpful if you have multiple event listeners on one side of the card.</em></li><li><em>W</em>e are using an anonymous function to set our flip because we want this logic to be executed ONLY on the click.</li><li>W<em>e’re going to replace our className=”card” with this ternary because we want the class name to change based on if the card is flipped or not. This is how we can give it directions to flip using CSS. (This will make more sense later)</em></li></ol><h4>To summarize, basically what we&#39;re saying here is “HEY COMPUTER, when someone clicks on this card, the front or back, change the state to the opposite of what it is in this moment (if true, change it to false and if false, change it to true) if true, add “flip” on to the class name.”</h4><p>Here is what everything should look like altogether!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*uW-zzfy-mDKk-BaR2gXQPg.png" /></figure><p><strong>Step 3: Now that we’ve added all our class names and our state, we can move on to where the magic happens, CSS! This is where we can make our cards actually flip.</strong></p><p><strong>Step 3A:</strong> Let’s start out by styling our card. Before we FLIP, we have to get our cards onto the page. I will not be going into too much detail about this but I will include the CSS I used as a reference. I would recommend at least setting a <em>height</em> and <em>width</em> to your cards so you can at least see where they are on the page, and get an idea of what your flip will look like so you can make adjustments to get the exact look you’re going for. You can also add additional styling to the card container which is our element with className=”card-grid”.</p><p><strong>Step 3B: *I will be referencing different class names as .name and properties will be </strong><em>italicized</em></p><ol><li>The first CSS property we want to set is <em>position</em>. According to W3 Schools, position “specifies the type of positioning method used for an element”. Were going to set the <em>position</em> of <strong>.card</strong> to <em>relative</em> and the <em>position</em> of <strong>.front</strong> and <strong>.back</strong> to <em>absolute</em>. This is so we can separate the information on the back and front of our card and ensure they do not conflict with each other. <strong>(Line 15, 45)</strong></li><li>Next, we&#39;re going to flip around the text on the backside of our card. We are going to add the <em>transform</em> property to <strong>.back</strong> and set it to <em>rotateY(180deg)</em> aka: were rotating on the y-axis 180 deg. We need to do this so when the card flips you can read the text on the back. ~If you were to write on the inside of a window and then go outside to read it, it wouldn’t be facing the right way. We have the same problem here and using the transform property will take care of that. <strong>(Line 51)</strong></li><li>Now our text is flipped but it is still visible from the front. To fix this we can set the <em>backface-visibility</em> property on <strong>.front</strong> and <strong>.back</strong> to <em>hidden</em>. This will hide anything that is rotated 180 deg AKA on the backside. Why are we putting this on the front and back? Well, we don&#39;t want the text on the front to show up on the back either! This will also hide the “front” of the card when we flip the card over. The “back side” is referring to the “other side”. We just don&#39;t want the text from the other side to show on the side the user is currently looking at. <strong>(Line 47)</strong></li><li>Next, we&#39;re going to work on our flip! YAY! In <strong>.card, </strong>set the <em>transform</em> property to <em>rotateY(var( — rotate-y, 0)) </em>aka: rotate (our flip is our rotation) on the Y-axis — how much should we rotate? We’re going to use a variable to represent that value so we can tell it exactly how much to rotate later in our <strong>.flip</strong>, which will be triggered onClick with our ternary. See? It&#39;s all coming together! The variable is — <em>rotate-y</em> and <em>0 </em>represents the default value. (We&#39;re also going to add perspective(1000px) this will tie into step 7 and make our flip look a little more 3D.) <strong>(Line 22)</strong></li><li>Then in <strong>.flip </strong>were going to set our variable <em>— rotate-y</em> equal to <em>180deg</em> which will flip it around <strong>(Line 36)</strong></li><li>Almost there! Next, we need to set the <em>transform style</em> property in <strong>.card</strong> to <em>preserve-3D</em>. This will give us the look of flipping our card 180 deg and is what keeps the elements on the backside of our card when we flip it! <strong>(Line 19)</strong></li><li>Lastly, let’s slow down our transformation because by default it’s a bit too quick to pick up on. We can ser the <em>transition</em> property in <strong>.card</strong> to<em> 150 ms</em>. which will make the flip more appealing and noticeable. <strong>(Line 20)</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*zhi0B4T6j2ChsRt3AtsArQ.png" /></figure><p><strong><em>NOTES</em></strong><em>:</em></p><ol><li><em>I ran into some issues with the back not showing all of my text. I fixed this by setting a max-width to the p element on the back of the card which allowed for more text to show up.</em></li><li><em>On line 23, we used another variable ( — translate-y) that is set in our card:hover. I’d recommend looking into this and testing yourself to figure out what it&#39;s doing!</em></li></ol><p>And that’s it! Now you have a beautiful flip animation! You can use the CSS to the left as a guide to the styling I used for the cards and for the grid layout! As well as a few extra features I added like the box-shadow and hover.</p><p>I hope this was helpful!</p><p>I’d like to give credit to Web Dev Simplified on youtube for solidifying my understanding of how to accomplish this. You can check out that video here: <a href="https://www.youtube.com/watch?v=hEtZ040fsD8&amp;t=2118s">https://www.youtube.com/watch?v=hEtZ040fsD8&amp;t=2118s</a></p><h3>Lets connect on LinkedIn!</h3><p><a href="https://www.linkedin.com/in/amie-n-foster/">https://www.linkedin.com/in/amie-n-foster/</a></p><p>As always, if you&#39;ve made it this far please enjoy a joke!</p><p><strong>Why did the child component have such great self-esteem?</strong></p><p>\/</p><p>\/</p><p>\/</p><p>\/</p><p>\/</p><p>\/</p><p><em>Because its parent kept giving it PROPS!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=131dba54fc96" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[To innerText, or not to innerText, that is the question!]]></title>
            <link>https://medium.com/@amie.n.foster/to-innertext-or-not-to-innertext-that-is-the-question-437336f5c0f?source=rss-a779dfcbfc19------2</link>
            <guid isPermaLink="false">https://medium.com/p/437336f5c0f</guid>
            <category><![CDATA[textcontent]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[innertext]]></category>
            <category><![CDATA[innerhtml]]></category>
            <dc:creator><![CDATA[Amie Foster]]></dc:creator>
            <pubDate>Sat, 18 Sep 2021 23:37:25 GMT</pubDate>
            <atom:updated>2021-12-07T06:59:37.796Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*hAxoTg47Q70iIRphBccciw.gif" /></figure><p>If you&#39;re anything like me, a baby coder learning Javascript and DOM manipulation, then you’re probably wondering what the heck is the difference between <strong>innerText</strong>, <strong>innerHTML</strong>, and <strong>textContent</strong>. I had this same question not too long ago. Luckily for you, I’ve done all the research and am here to provide some clarity!</p><p>Okay, let us start from the beginning. When you&#39;re learning to manipulate the DOM in Javascript, it can be quite overwhelming. There are so many concepts being introduced to you and all the while you&#39;re probably thinking to yourself, <em>“what the heck is the point of all this?”</em>. Somewhere in that confusing mess, between all the querySelectors, and appendChilds, you learn about three seemingly identical ways to add text to your application; <strong>innerText</strong>, <strong>innerHTML</strong>, and <strong>textContent</strong>. Before we jump into explaining and differentiating between these three, let’s talk about <strong>attributes</strong> and <strong>properties</strong>. Knowing the difference between the two will also help us to understand the differences between our three main concepts. <strong>Attributes</strong> act on the actual HTML — think <em>src</em> attribute for a &lt;<em>img&gt;</em> tag or <em>href</em> attribute for a &lt;<em>a&gt;</em> tag, while <strong>properties</strong> belong to DOM objects.</p><h3><strong>textContent</strong></h3><p><strong>textContent</strong> is the only method that is a <strong>property</strong>. What this means that it is a property of the node on the DOM. <strong>textContent</strong> represents the actual text content of the node and all of its descendants (nested child nodes). It will only output the actual text characters and the browser won&#39;t try to parse it as HTML. So what does it do in action? <strong>textContent</strong> will render all text belonging to every element within it. For example, if you have a &lt;<em>h2</em>&gt; tag with a nested &lt;<em>br</em>&gt; tag, followed by some text, it won’t render the break (because it doesn&#39;t recognize these HTML directions) but it will render the text. It is important to note that if you are setting a new <strong>textContent</strong> value on an existing node, it will replace ALL the existing nodes with the new value. Similarly, if you&#39;re extracting existing text content it will render all existing nested nodes. Lastly, <strong>textContent</strong> is preferred over other methods because its value is NOT parsed as HTML, making it more secure. (We will discuss this more later.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*385AmW7KUqbBSM2KrXGGdw.jpeg" /><figcaption>Examples of using textContet</figcaption></figure><h3>innerText</h3><p><strong>innerText</strong> is an <strong>attribute</strong> of HTML, meaning you call <strong>innerText</strong> on an HTML element. It will only show you text that is readable by humans. Like <strong>textContent</strong>, <strong>innerHTML</strong> will not return any HTML tags nested with it, but it will return the content of those tags. Sounds like a bunch of similarities…So what exactly is the difference between <strong>innerText</strong> and <strong>textContent</strong>? Unlike <strong>textContent</strong>, <strong>innerText</strong> also takes CSS styling into account, for example, it knows not to return elements with text = “hidden’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*inC9pU7G92IL8ON0XJvTaw.jpeg" /><figcaption>Examples of using innerText</figcaption></figure><h3>innerHTML</h3><p>last but not least, <strong>innerHTML</strong>! <strong>InnerHTML</strong> is also an HTML attribute. Which, again, means you can call it on an HTML element. <strong>InnerHTML</strong> will set or return the HTML content of an element. It will return all text, along with all nested tags within an element. In summary, it sets or returns the HTML (text, tags, and everything) contained in an element. There is a caveat to using <strong>innerHTML</strong> and that is, it could leave your application vulnerable to Javascript injection. This is a way that outside hackers inject their own code into a website to access delicate consumer information, because, again, <strong>innerHTML</strong> can parse HTML elements, not JUST plain text. (If you&#39;re interested in more information on this I suggest searching for ‘Javascript injection’ on YouTube.) To avoid this is is common practice to use <strong>textContent</strong> instead (because it cannot parse HTML).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ligCYTe3XoCeR6A_8e_FYA.jpeg" /><figcaption>Examples of using innerHTML</figcaption></figure><h3>To summarize,</h3><h4>textContent</h4><p>— DOM property</p><p>— output is text characters</p><p>— will include child nodes</p><h4>innerText</h4><p>— HTML attribute</p><p>— renders readable text</p><p>— can recognize CSS styling</p><p>— will include child nodes</p><h4>innerHTML</h4><p>— HTML attribute</p><p>— returns HTML elements and text</p><p>— potential security risk</p><p>There are probably a few more differences that I am missing, but for now, in the begging stages of learning, I think these are the most important characteristics to get you by. Happy coding!</p><h3>Lets connect on LinkedIn!</h3><p><a href="https://www.linkedin.com/in/amie-n-foster/">https://www.linkedin.com/in/amie-n-foster/</a></p><p>As a thank you for making it this far, here is a joke!</p><p>Why did the programmer quit his job?</p><p>\/</p><p>\/</p><p>\/</p><p>\/</p><p>\/</p><p>\/</p><p>Because he didn&#39;t get arrays.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=437336f5c0f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Welcome To My Blog]]></title>
            <link>https://medium.com/@amie.n.foster/welcome-to-my-blog-795252a3d3ab?source=rss-a779dfcbfc19------2</link>
            <guid isPermaLink="false">https://medium.com/p/795252a3d3ab</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[coding-bootcamp-students]]></category>
            <category><![CDATA[women-who-code]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <dc:creator><![CDATA[Amie Foster]]></dc:creator>
            <pubDate>Fri, 17 Sep 2021 22:38:35 GMT</pubDate>
            <atom:updated>2021-09-17T22:39:19.663Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, my name is Amie! Welcome to my blog! Three weeks ago I began my journey into tech. I started the software engineering program at Flatiron School and couldn’t be more excited to start this blog and document the process. Here I will share my personal experience going through the boot camp, as well as some technical concepts, tips, and tricks that I learn along the way.</p><figure><img alt="animated photo of hands typing on a laptop with notepad" src="https://cdn-images-1.medium.com/max/1024/1*NmKFlGo7bJMrxzcl8aIpZQ.png" /></figure><p>I’m only three weeks in (out of 15) and boy, what a rollercoaster it has been. The first week was overwhelming, to say the least. The only way I could describe it was like a child who was just thrown in the pool and told to swim. At the time it felt like there was no way I was going to digest everything we were learning. Thankfully, the course moves so quickly you don’t have time to ruminate on how lost you feel. The only choice is to just move on and keep pushing forward. So I did just that and by the end of week 2, I had completed many of the additional practice labs, my first code challenge, and was feeling much more comfortable overall.</p><p>That brings us to now. The end of week three, project week, also marks the end of phase 1. I just turned in my first project and I couldn’t be more proud of the work I’ve accomplished along with my groupmates. It&#39;s wild to see how far I’ve come in only three weeks. From feeling lost and overwhelmed to reaching a place of understanding and embracing the uncomfortable experience that is learning something completely new. I am feeling much more grounded, capable, and excited to keep coding!</p><p>As a thank you for making it this far here is a joke:</p><h4>Why was the JavaScript developer sad?</h4><p>\/</p><p>\/</p><p>\/</p><p>\/</p><p>\/</p><p>\/</p><p>Because he didn’t Node how to Express himself</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=795252a3d3ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>