<?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 Dominic DeRosa on Medium]]></title>
        <description><![CDATA[Stories by Dominic DeRosa on Medium]]></description>
        <link>https://medium.com/@domderosa?source=rss-4166cca7b12a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qt7nIMT3sJd9XTMEo4LPJg.png</url>
            <title>Stories by Dominic DeRosa on Medium</title>
            <link>https://medium.com/@domderosa?source=rss-4166cca7b12a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 19:45:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@domderosa/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[A Short Guide to Using Bootstrap in React]]></title>
            <link>https://domderosa.medium.com/a-short-guide-to-using-bootstrap-in-react-9e9c617350df?source=rss-4166cca7b12a------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e9c617350df</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[bootstrap]]></category>
            <dc:creator><![CDATA[Dominic DeRosa]]></dc:creator>
            <pubDate>Thu, 26 Aug 2021 16:41:56 GMT</pubDate>
            <atom:updated>2021-08-26T16:41:56.882Z</atom:updated>
            <content:encoded><![CDATA[<p>If your project needs some quick styling Bootstrap is an open-source CSS framework that can accelerate the front-end development of your web app. This short guide will introduce you to bootstrap and show you how to implement the basic bootstrap requirements necessary for you to hit the ground running and begin exploring all that Bootstrap has to offer.</p><p>Before getting started, this article is targeted towards React, and will assume you have a basic familiarity with React and its prerequisites.</p><p>To get started, you will need to install bootstrap, type the following command into your CLI:</p><pre>npm install react-bootstrap@next bootstrap@5.1.0</pre><p>For my first project using Bootstrap I wanted to style my button elements, so for this demo, we will use buttons as an example. Start by importing the Button component:</p><pre>import Button from ‘react-bootstrap/Button’;</pre><p>Once you have imported your component, it can be implemented in your React project like any other component. Here is an example of the syntax for our button component.</p><pre>&lt;Button&gt;I’m a Bootstrap Button&lt;/Button&gt;</pre><p>And here is the before and after of our button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/195/1*2WfrsZN4gqK4iMwMnrZrqw.png" /></figure><p>Now, you can quickly change the colors by adding the variant prop. Here are a few examples</p><pre>&lt;Button variant=”success”&gt;Success&lt;/Button&gt;</pre><pre>&lt;Button variant=”warning”&gt;Warning&lt;/Button&gt;</pre><pre>&lt;Button variant=”danger”&gt;Danger&lt;/Button&gt;</pre><pre>&lt;Button variant=”outline-primary”&gt;Primary&lt;/Button&gt;</pre><pre>&lt;Button variant=”outline-dark”&gt;Dark&lt;/Button&gt;</pre><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FrKhYiFnyBFKu0Un6sD%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FrKhYiFnyBFKu0Un6sD%2Fgiphy.gif%3Fcid%3D790b76112f7862077d00d1c169d4bb8c3547977670b15879%26rid%3Dgiphy.gif%26ct%3Dg&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FrKhYiFnyBFKu0Un6sD%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="251" frameborder="0" scrolling="no"><a href="https://medium.com/media/eaca557dcce247b99a7738cfdb26ae3a/href">https://medium.com/media/eaca557dcce247b99a7738cfdb26ae3a/href</a></iframe><p>You can also change the size by adding the size prop.</p><pre>&lt;Button size=”sm” variant=”success”&gt;Small&lt;/Button&gt;</pre><pre>&lt;Button variant=”outline-primary”&gt;Medium&lt;/Button&gt;</pre><pre>&lt;Button size=”lg” variant=”outline-dark”&gt;Large&lt;/Button&gt;</pre><p>Summary: This short and sweet tutorial is really just a quick way to get you started in Bootstrap with React. There are loads of components, <a href="https://react-bootstrap.github.io/components/alerts/">https://react-bootstrap.github.io/components/alerts/</a>, and from here, the sky is the limit for your styling needs.</p><p>Enjoy and happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e9c617350df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[querySelector: A Common Pattern]]></title>
            <link>https://domderosa.medium.com/queryselector-a-common-pattern-7eb81255b79f?source=rss-4166cca7b12a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7eb81255b79f</guid>
            <dc:creator><![CDATA[Dominic DeRosa]]></dc:creator>
            <pubDate>Wed, 04 Aug 2021 22:13:18 GMT</pubDate>
            <atom:updated>2021-08-04T22:13:18.085Z</atom:updated>
            <content:encoded><![CDATA[<p>When learning something new, pattern recognition is how we go from unfamiliar with a set of steps, to effortlessly iterating through the process and identifying when it should be used.</p><p>A common pattern in JavaScript is the need to make a website change when a user interacts with it. To do this, we need to identify three things:</p><p><em>What did the user interact with?</em></p><p><em>How did they interact with it?</em></p><p><em>What do we want to change?</em></p><p>This post will explore this pattern, and help you identify when to use it.</p><h4>What did the user interact with? Enter the querySelector…</h4><p>This is all about identifying an element or elements you are expecting an interaction with. There are several methods available to accomplish this, one of the most common and versatile is document.querySelector(). This method takes one argument, a CSS selector as a string, and will return the first element that matches the provided selector.</p><pre>const firstButton = document.querySelector(‘CSS selector’)</pre><p>One easy way to find your selector is to inspect the elements in chrome. When you find the element you are looking for right-click on the element &gt; Copy &gt; CopySelector.</p><h4>2. How did the user interact with the element?</h4><p>Once you have identified the element, we need to tell the browser to listen for any user interactions with it. For this, we use an eventListener. The first parameter of an eventerListner is the event. There are many event types (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Element#mouse_events">MDN Docs: Event Reference</a>), some common events are click, dblclick and mouseover. Here’s an example (:</p><pre>element.addEventListener(‘click’, callback function)</pre><p>3. What do we want to change on the page?</p><p>The last step is to make the actual change. We input this change as a callback function. There’s a myriad of changes one could make, from creating and deleting elements, to updating styles. The callback function has a single optional argument, representing the event that just occurred. This object contains a robust collection of data, that can be very useful depending on what updates we are trying to make. Before building your callback function, it is often helpful to console.log it to find the data you are looking for.</p><p>Additionally, since this object is very large, it can be useful to copy the path to be used in your callback function. A common path is e.target.[value you’re looking for].</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FVSCZTGWmIIeXgrilyP%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Feventlistener-VSCZTGWmIIeXgrilyP&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2FVSCZTGWmIIeXgrilyP%2Fgiphy.gif%3Fcid%3D790b76111c8686484a1a0e0940cfa0a3b63dc31e4f8473df%26rid%3Dgiphy.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="311" frameborder="0" scrolling="no"><a href="https://medium.com/media/ac0936a802276fc0c5c4fef06b4e1170/href">https://medium.com/media/ac0936a802276fc0c5c4fef06b4e1170/href</a></iframe><p>In the example below, we are updating the innerText of the button.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FKhhqd7swS6BnS6beBv%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Feventlistener-and-queryselector-Khhqd7swS6BnS6beBv&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2FKhhqd7swS6BnS6beBv%2Fgiphy.gif%3Fcid%3D790b76110f75e6a379dbb024f2e7d9058e67aacb95bf33bb%26rid%3Dgiphy.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="193" frameborder="0" scrolling="no"><a href="https://medium.com/media/d41cf61542ab4bac3755e95e8b32618d/href">https://medium.com/media/d41cf61542ab4bac3755e95e8b32618d/href</a></iframe><h4>Next Steps: Updating Multiple Elements</h4><p>To do this, we will follow the same steps:</p><ol><li>What elements do we want to identify?</li></ol><p>When you are identifying multiple elements, a common method to use is the document.querySelectorAll(). It is similar to querySelector, however, it returns an array of matching elements in a NodeList. It is important to note that a NodeList is different from an array. While some of the usual array methods are available on a NodeList, such as length, and forEach, other methods such as map, reduce, and filter are not available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*VWd7odosDtAe00-HJgIzLg.png" /></figure><p>2. What user interaction are we looking to listen for?</p><p>We will again need an eventListener to listen for user interactions. This time, however, we will need to apply it for each element individually. For the sake of simplicity, we will keep the callback function the same.</p><pre>let buttons = document.querySelectorAll(‘button’)</pre><pre>buttons.forEach(button =&gt; button.addEventListener(‘click’, (e) =&gt; e.target.innerText = ‘I was clicked!’))</pre><p>And here is our querySelectorAll:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FkRGtd21YhPlFTX7GZZ%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fqueryselectorall-kRGtd21YhPlFTX7GZZ&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2FkRGtd21YhPlFTX7GZZ%2F200.gif%3Fcid%3D790b76110a2f8fea25e320b96c157690985eb22c0764120b%26rid%3D200.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="143" frameborder="0" scrolling="no"><a href="https://medium.com/media/7ca9586b140fe5b1a833ac73727ac4d9/href">https://medium.com/media/7ca9586b140fe5b1a833ac73727ac4d9/href</a></iframe><p>Conclusion</p><p>This three-step pattern is one you will encounter countlessly when doing front-end development. While you do not need to know every possible event, or the entire contents of the event object, it is important to practice this flow of concepts so that they become muscle memory <a href="https://emojipedia.org/flexed-biceps/">💪</a><a href="https://emojipedia.org/brain/">🧠</a>.</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7eb81255b79f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Need for Speed - Accelerate your development with these VSCode and terminal shortcuts.]]></title>
            <link>https://domderosa.medium.com/need-for-speed-accelerate-your-development-with-these-vscode-and-terminal-shortcuts-5020bc3b43fe?source=rss-4166cca7b12a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5020bc3b43fe</guid>
            <category><![CDATA[html]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[shortcuts]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Dominic DeRosa]]></dc:creator>
            <pubDate>Wed, 14 Jul 2021 21:55:34 GMT</pubDate>
            <atom:updated>2021-07-14T22:30:12.225Z</atom:updated>
            <content:encoded><![CDATA[<p>As a seven-year-old, I would bait people playing games online to press Alt+f4 to “win free coins.” In reality, it was a shortcut that would close their current window and kick them out of the game. I like to think I’ve matured a bit since then, but for as long as I can remember I’ve loved keyboard shortcuts.</p><p>Saving time matters. Watch anyone who is masterful, a chef slicing vegetables has an economy of movement a home cook doesn’t benefit from.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FPpSeskFtQckvcFIEk2%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FPpSeskFtQckvcFIEk2%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FPpSeskFtQckvcFIEk2%2Fgiphy-downsized-large.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="432" frameborder="0" scrolling="no"><a href="https://medium.com/media/5df4282df313884f4f57115b038f54d1/href">https://medium.com/media/5df4282df313884f4f57115b038f54d1/href</a></iframe><p>As a developer who spends the majority of their time in front of a computer, it’s important to be as efficient as possible. Using your mouse is like riding a tricycle your entire life. This post is intended to get us on two wheels. Below are some of my favorite beginner shortcuts for VSCode and CLI.</p><h3><strong>VSCode Shortcuts</strong></h3><ol><li><strong>Multi-cursor selection: Cmd + Shift + L</strong></li></ol><p>Need to replace the same word in multiple places? This shortcut is a lifesaver. Select the word, tap the shortcut above, and type. It will replace all instances throughout the page.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FqgcXzM0j0vfu0lGuNy%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fvscode-shortcut-qgcXzM0j0vfu0lGuNy&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2FqgcXzM0j0vfu0lGuNy%2F200.gif%3Fcid%3D790b76119baf8094ce982919cd5944c881faedbb9ec0f9ca%26rid%3D200.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="137" frameborder="0" scrolling="no"><a href="https://medium.com/media/26f5e77999187d162057d1956ff09fa9/href">https://medium.com/media/26f5e77999187d162057d1956ff09fa9/href</a></iframe><p>2. <strong>Select a single word: Cmd + d</strong></p><p>Need to select a single word in VSCode before using your multi-cursor selector? As long as your cursor is touching a word Cmd + d will select the entire word.</p><p>3. <strong>Move a row of code up or down the page: Opt+Down or Opt+Up</strong></p><p>This will move a row or several rows of code up or down. I love this one.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FtpbxNb4QaRhwsCnKxs%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fjs-javascript-vscode-tpbxNb4QaRhwsCnKxs&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FtpbxNb4QaRhwsCnKxs%2Fgiphy.gif%3Fcid%3D790b76116993f3c6e75e3d52084d942205e5789d1cf42b7b%26rid%3Dgiphy.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="209" frameborder="0" scrolling="no"><a href="https://medium.com/media/030f77bec56e763440e19819dbb8f7a5/href">https://medium.com/media/030f77bec56e763440e19819dbb8f7a5/href</a></iframe><p>4. <strong>HTML skeleton: ! Enter</strong></p><p>This black magic will undoubtedly save you time. You may want to avoid this one while learning, as repetition writing out the HTML skeleton will help you learn faster… But this one is hard to not use.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FZJhsTH8shF3Q8cFECy%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fhtml-vscode-shotcut-ZJhsTH8shF3Q8cFECy&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2FZJhsTH8shF3Q8cFECy%2F200.gif%3Fcid%3D790b7611eafe5aae20aba8cc03d49a37d4f5dbb6b91f4fb6%26rid%3D200.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="154" frameborder="0" scrolling="no"><a href="https://medium.com/media/9661a8916a475082ee539c992eafb148/href">https://medium.com/media/9661a8916a475082ee539c992eafb148/href</a></iframe><p><strong>5. Toggle the sidebar: Cmd + b</strong></p><p>Need a little more screen space? This will hide the bar on the left side of the screen.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FonKjkiOEOgeFg5NR3q%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fvscode-shortcut-onKjkiOEOgeFg5NR3q&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FonKjkiOEOgeFg5NR3q%2F200.gif%3Fcid%3D790b761106f8b688a072662b655a6282eead1ae5ee268c7d%26rid%3D200.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="154" frameborder="0" scrolling="no"><a href="https://medium.com/media/9355e1e6aa58466545f1ad4f30524ffb/href">https://medium.com/media/9355e1e6aa58466545f1ad4f30524ffb/href</a></iframe><p>6. <strong>No highlight copy a whole line in VSCode: Cmd-C</strong></p><p>In VSCode there is no need to highlight an entire row if you need to copy it. As long as your cursor is on the row you intend to copy. Simply cmd-c your way to victory. This also works with cutting!</p><p>And now, Five more terminal shortcuts to get your cursor flying around the terminal like Harry on a Nimbus 2000…</p><h3><strong>Terminal Shortcuts</strong></h3><ol><li><strong>Move the cursor to the front of the command line: Ctrl + a</strong></li><li><strong>Move the cursor to the end of the command line: Ctrl + e</strong></li><li><strong>Move the cursor forward one word: Ctrl + f</strong></li><li><strong>Move the cursor to the back one word: Ctrl + b</strong></li><li><strong>Clear the command line: Ctrl + u</strong></li></ol><p>Summary: This is just scraping the surface of shortcuts available to us as developers. If there is a mouse action you are wishing upon a star was a keyboard shortcut for, just google it. There usually is. And if not, many programs allow you to create custom shortcuts but that’s a topic for another article. Happy coding!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*j8Zi60DjclaSJGxzTzIEMA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5020bc3b43fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>