<?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 Elana Olson on Medium]]></title>
        <description><![CDATA[Stories by Elana Olson on Medium]]></description>
        <link>https://medium.com/@elanaolson?source=rss-1678fc50ddc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lu7jffl6rTpQc28ymwO_BQ.jpeg</url>
            <title>Stories by Elana Olson on Medium</title>
            <link>https://medium.com/@elanaolson?source=rss-1678fc50ddc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 13 Nov 2026 20:32:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@elanaolson/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 beginner’s guide to building a React NextJS app]]></title>
            <link>https://medium.com/@elanaolson/a-beginners-guide-to-building-a-react-nextjs-app-7463120389f0?source=rss-1678fc50ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/7463120389f0</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[material-ui]]></category>
            <dc:creator><![CDATA[Elana Olson]]></dc:creator>
            <pubDate>Wed, 06 Mar 2024 21:03:41 GMT</pubDate>
            <atom:updated>2024-03-06T21:03:41.358Z</atom:updated>
            <content:encoded><![CDATA[<p>Building web apps can feel complicated and often we get stuck on all the options out there for building them. This is just one girl’s perspective on the tech and specs she likes, but let me tell you, many of these tools have been tried and tested by me for years in personal and professional projects, so it’s a solid rec 😺</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wFdy4kt3t4EignnI" /><figcaption>Photo by <a href="https://unsplash.com/@lingchor?utm_source=medium&amp;utm_medium=referral">Lingchor</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Here is an example application using the technologies and practices outlined in this article<strong>: </strong><a href="https://github.com/ellamaolson/react-portfolio-app"><strong>react-portfolio-app</strong></a></p><p><em>We’ll cover some core areas</em></p><ul><li><em>Environment setup</em></li><li><em>Start</em></li><li><em>Understanding the code</em></li><li><em>Component libraries</em></li><li><em>Hooks and the Component Lifecycle</em></li></ul><h3>Environment setup</h3><p>Language | Typescript with React library</p><p>Compile &amp; Deploy | Node</p><p>Package manager | Yarn (read <a href="https://medium.com/@hanke.liu/understand-node-js-npm-and-nvm-efc61dfd7ff8">understanding node, nvm, and npm</a>)</p><p>Text Editor | VSCode</p><p>Debug on | Chrome</p><p><strong>Simple as that, right? </strong>Not quite, we need to understand how all these tools and technologies work with each other to render a beautiful web page.</p><h4>Language: Typescript with React library and Next.js framework</h4><p>TypeScript (TS) casts a stricter enforcement of data types onto our code, which is used to structure the compiled version of JavaScript (JS) — enabling us to catch more bugs when building the code.</p><p>React offers us a structure to build in a component-based architecture so that we have reusable and shareable components. The library aids in creating defined avenues for routing, querying, rendering at varying times, extrapolating JS into a far more readable and concise language. <strong>We use TS and React to wrangle the JS beast.</strong></p><p>Next.js is a framework we will use to handle configuring React to be more structured and seamless when building the app. It eases the challenges of implementing routing, data fetching, and caching for React apps and employs server-side rendering for most of the functionality, unless we specify to render from the client side.</p><h4>Compile &amp; Deploy: Node</h4><p>Ah yes, my love, Node. Node is a beautiful framework that enables JS to be built in the backend and create a cohesive fullstack application within a <strong>single language</strong>. Everything can be compiled and deployed at once, making frontend and backend development far more seamless.</p><p>Head to <a href="https://nodejs.org/en/">nodejs.org</a> to download the latest version of Node. After installation, confirm node is downloaded with:</p><pre>node -v<br>npm -v</pre><h4>Package Manager: Yarn</h4><p>A package manager helps us contain and organize our node project into smaller more succinct modules. The debate between NPM and Yarn is one that will outlast my career, but my two cents are that while both <strong>can</strong> do the same functionality, Yarn is faster (<a href="https://medium.com/@salluarsh/npm-vs-yarn-f4a7331442b7#:~:text=Performance%3A%20Yarn%20is%20generally%20faster,help%20to%20prevent%20dependency%20vulnerabilities.">read more here</a>).</p><p>Head to <a href="https://classic.yarnpkg.com/lang/en/docs/install">classic.yarnokg.com</a> to install Yarn. You can use npm to install yarn (which was installed with Node) or an alternative like homebrew or a curl script. After installation, confirm yarn is downloaded with:</p><pre>yarn -v</pre><p><strong>NVM (Optional)</strong></p><p>You can use <strong>nvm</strong> to manage the node version for individual projects since some project dependencies may require a different version of Node.</p><p>Head to <a href="https://codedamn.com/news/nodejs/nvm-setup-guide">this guide</a> to install NVM, if you run into any issues you can review the <a href="https://github.com/nvm-sh/nvm">README for nvm</a> to troubleshoot. After installation, confirm nvm is downloaded with:</p><pre>nvm -v</pre><p>I suggest setting the latest version of Node to the default with the below commands, then exit and open a new tab in terminal for the configuration to be set:</p><pre>nvm alias default node<br>nvm use default</pre><h4>Text Editor: VSCode</h4><p>This is the best editor! There, I said it! Come at me 👊 <a href="https://react.dev/learn/editor-setup#your-editor">Here’s a helpful guide for setting up your editor</a></p><p>Obviously everyone has their preference, but I LOVE the visual aids it has<em> </em>for viewing your code in a tree structure (far more helpful than you’d expect), seeing the diffs on code changes, and if you’re lazy like me sometimes making your commits from the editor 😬</p><p>Here’s an example of one of VSCode’s awesome visuals — it’s highlighting the commit changes when I added Material UI NextJS integrations to the codebase:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O8OJ4Iiw8h9rrb6aseazNQ.png" /></figure><h4>Debug on: Chrome</h4><p>Chrome or Firefox are good choices for debugging code, both have quality inspectors to see code structure, console errors, network events, local and session storage, <a href="https://react.dev/learn/typescript">React components</a> structure, analytics tabs and much more! Throw a pointer in there and start debugging (<a href="https://developer.chrome.com/docs/devtools/open">read more here</a>).</p><h3>Start</h3><p>1.Navigate in your terminal where you’d like to store your project <br>cd ~/code</p><p>2. We’ll follow <a href="https://react.dev/learn/start-a-new-react-project#nextjs-pages-router">Reacts how-to guide</a> for spinning up a React app with Next.js<br>npx create-next-app@latest</p><p>3. This will ask you a series of questions — name your project and press enter for each of the questions to initialize a basic app</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*PkLtMiUtjdkdhQuNc9drAQ.png" /></figure><p>4. Navigate into the application directory and open it in VSCode<br>cd elana-olson-react-next-app<br>code . // opens VSCode from terminal</p><p>5. Now let’s serve this baby up and see what we’re working with! Navigate to the README.md and press ⇧⌘V in the editor to <a href="https://code.visualstudio.com/docs/languages/markdown#_markdown-preview">preview the markdown</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*4TlNYO1EQnpn8MbhMiRFKg.png" /></figure><p>The README.md tells us to run the development server, type into the terminal<br>yarn dev</p><p>6. Once you see <strong>✓</strong> Ready in the terminal, navigate to <a href="http://localhost:3000">http://localhost:3000</a> in Chrome and you’ll see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TF2E2D2R0aX_lagXGIaNgQ.png" /></figure><p>Congrats! You now have a Next.js React app running!</p><h3>Understanding the Code</h3><p><em>You can read this code in github in the example app: </em><a href="https://github.com/ellamaolson/react-portfolio-app"><strong><em>react-portfolio-app</em></strong></a></p><p>Let’s investigate the initialized files, <a href="https://nextjs.org/docs/getting-started/project-structure">Next.js documents the project structure well</a> , but we’ll briefly review what the top level files and folders are for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/325/1*lB4GzFviV_Nj5sDYsIjTmg.png" /></figure><p>.next | Stores features that help with performance like page caching</p><p>node_modules | Stores the packages and dependencies defined in package.json</p><p>public| Stores publicly accessible files like assets (images)</p><p>src | Stores all our custom source code 💚</p><p>.eslintrc.json | Configuration for ESLint. ESLint helps us define specific patterns for JavaScript and catch problematic patterns before deploying.</p><p>.gitignore | Defines which files/folders not to publish to the repository. Files and folders like node_modules which are far too big to publish or secret files that would expose vulnerable credentials.</p><p>next-env.d.ts | TypeScript declaration for Next.js</p><p>next.config.mjs | Configuration for Next.js</p><p>package.lock.json | Automatically generated by the package manager… don’t manually change this file.</p><p>package.json | Defines project scripts and dependencies to enable us to run the project</p><p>postcss.config.js | Configuration for css</p><p>README.md | An engineer’s “How To” guide and <strong>crucial</strong> <strong>documentation</strong> for how to use this project</p><p>tailwind.config.ts | Configuration for tailwind css</p><p>tsconfig.json | Configuration of TypeScript strictness, structure, and compiler</p><h4>README, package.json, &amp; tsconfig.json</h4><p>The most important files to review in any project are: README.md , package.json , &amp; tsconfig.json , though all configuration files will impact the structure and strictness of your code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*L2U6YKdV-V7SeNyyw4QjIw.png" /></figure><p>The scripts section defines what commands we run in the terminal to develop, compile, start, and analyzing code for potential errors. For each of them, type Yarn in front of it to run the script.</p><p>Notice that we are on the latest versions of React, React-dom, and Next — this is a good practice to follow of staying up to date with all dependencies, but especially the foundational libraries and frameworks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*Ex5fVQrMBFtEIamq3q8jpA.png" /></figure><p>In the tsconfig.json we want to pay attention to module and moduleResolution — these two define how TypeScript scopes global and local state (i.e. Modulaization determines whether a variable in a file is readable and usable outside of that file or package). Using moduleResolution: bundler allows us to define global state via &quot;imports&quot; and &quot;exports&quot; without needing file extensions on relative paths. You can <a href="https://www.typescriptlang.org/docs/handbook/modules/introduction.html">read more here</a> to further understand module theory and how to apply it to your app.</p><h4>src/</h4><p>Now that you understand the root level files, take a look into the src/ folder (otherwise known as app). The key files here are layout.tsx and page.tsx —<strong> </strong>Next.js uses pages and layouts to define routes and components in the app.</p><p><strong>Pages</strong></p><blockquote>In Next.js, a page is a <a href="https://react.dev/learn/your-first-component">React Component</a> exported from a .js, .jsx, .ts, or .tsx file in the pages directory. Each page is associated with a route based on its file name.</blockquote><p>We can think of pages as routes and the pages directory as the root folder/home for all our routes. So if you want to create an About page on your website, it would be accessed at /about and housed in the codebase under pages/about.ts .</p><p><strong>Layouts</strong></p><blockquote>The React model allows us to deconstruct a <a href="https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts">page</a> into a series of components. Many of these components are often reused between pages. For example, you might have the same navigation bar and footer on every page.</blockquote><p>Layouts enable us to create reusable patterns for our app, either for the entire app or per-page.</p><p><a href="https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts">Next.js details an excellent guide to Page and Layout usage</a>.</p><h3>Component libraries</h3><p>A component library is a set of frontend reusable components that are frequently used throughout an application. The library <em>should</em> follow accessibility standards, themes, and enable you to quickly plug and play components into your app so you don’t have to create entirely new basic components like buttons and menus.</p><p>The cons to a library are: you need to familiarize yourself with all the components and there are limitations to what those components will do — they will not cover every edge case or design that you have in mind. In cases where you’re building a very simple app, a component library could be a hindrance, but component libraries can be powerful tools once learned!</p><p>Checkout <a href="https://prismic.io/blog/react-component-libraries">these various UI libraries</a> or incorporate one you are already familiar with! The point of using one is to speed along your coding, so go with something you like.</p><h4>Material UI (Optional)</h4><p>Here’s a short article I wrote detailing <a href="https://medium.com/@elanaolson/integrating-material-ui-into-a-react-nextjs-app-55a95e15d767">how to integrate material ui into a react nextjs app</a>.</p><h3>Hooks and the Component Lifecycle</h3><p>Now that we have an army of tools at our command, we need to understand how to wield them…. so the render cycle is of utmost importance! “Hooks are functions that let you “hook into” React features like state, lifecycle methods, and context from your function components,” (<a href="https://mysteryweevil.medium.com/the-power-of-react-hooks-e5763d5e9c0a">The Power of React Hooks</a>).</p><p>We can tap into the React render lifecycle in the three phases — mount, update, unmount — using hooks. The mount phase allows us to insert elements into the DOM, set initial state, and load the elements on the first render. The update phase occurs when props or state changes and we need to update the component, which retriggers the render() function. Finally, the unmount phase removes the react component from the DOM and cleans up any related state.</p><p>I suggest reading <a href="https://medium.com/codex/the-lifecycle-of-a-react-component-8e01332a068d">The Lifecycle of a React Component</a> to understand what React methods are called during these phases. When using hooks, we don’t call the React functions likegetDerivedStateFromProps()directly, the hooks do this for us. Hooks like useState will initialize, update, and clean state for us as we use the component. The article <a href="https://javascript.plainenglish.io/react-component-lifecycle-methods-with-react-hooks-f53b5f62757f">React Component Lifecycle Methods with React Hooks</a> outlines this relationship and how to transition your use of lifecycle methods to hooks.</p><p><strong>The key takeaways here are (1) we need to understand the lifecycle of a React component to know how to update data and (2) hooks help us do this smoothly.</strong></p><p><a href="https://react.dev/reference/react/hooks"><strong>Checkout React’s docs</strong></a><strong> to thoroughly understand the usage of hooks.</strong></p><p>That’s all folks! If you think I’ve missed anything or you gave this tutorial a whirl, please leave some feedback! Hope this helps you enter the wonderful world of React coding 😺</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7463120389f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ultimate packing list for women world travelers]]></title>
            <link>https://medium.com/@elanaolson/ultimate-packing-list-for-women-world-travelers-f92e7679ff9a?source=rss-1678fc50ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/f92e7679ff9a</guid>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[packing-lists]]></category>
            <category><![CDATA[women]]></category>
            <category><![CDATA[minimalism]]></category>
            <dc:creator><![CDATA[Elana Olson]]></dc:creator>
            <pubDate>Mon, 04 Mar 2024 17:01:43 GMT</pubDate>
            <atom:updated>2024-03-04T17:01:43.344Z</atom:updated>
            <content:encoded><![CDATA[<h3>Ultimate Packing List for Women World Travelers</h3><p>A short packing guide to get you out the door on your next adventure!</p><p>All the things I’ve learned from traveling, backpacking, and adjusting to different weather. This is what has worked for me — having enough clothing for all scenarios, being flexible with changing environments, and saving room for the memories!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fwWOamRSeQTOzzp1Wa8sAw.jpeg" /><figcaption>At the very end of the trip - bags stuffed full of gifts and memories!</figcaption></figure><p>This packing list is oriented around outdoor activities like hiking and beach going, generally warmer weather climates, and a few city days interspersed. If you lean more outdoorsy or city oriented, adjust this list as fits you.</p><h3>Shoes</h3><ul><li>Sneakers (Altra Lone Peak trail runners)</li><li>Sandals (Teva classic or midform universal)</li></ul><h3><strong>Clothing Essentials</strong></h3><ul><li>Rain jacket shell</li><li>Light sweater/cardigan/hoodie</li><li>Button down sun cover (Zara has some thin button downs)</li><li>longsleeve merino wool shirt</li><li>2 athletic tank tops with built in bras</li><li>2 loose tshirts</li><li>fun going-out blouse</li><li>leggings</li><li>flair loose pants or longer skirt</li><li>athletic shorts</li><li>swimsuit</li><li>2 bras</li><li>2 sports bras</li><li>9 pair underwear</li><li>4 pair socks (2 hiking socks, 1 lowpro, &amp; 1 cozy pair)</li><li>set of loose pajamas</li></ul><p><strong>If colder weather add:</strong></p><ul><li>Ultralight down jacket</li><li>longsleeve shirt</li><li>pants</li><li>Scarf</li><li>Beanie</li></ul><p><strong>If hotter &amp; sunnier weather add:</strong></p><ul><li>sun cover</li><li>swimsuit</li><li>2 loose tank tops</li><li>shorts</li></ul><h3>Accessories</h3><ul><li>Small daypack</li><li>Bumbag/fanny pack</li><li>Tote bag</li><li>Hat (baseball cap is easy to pack)</li><li>2 pair sunglasses (I typically break one)</li></ul><h3>Other Essentials</h3><ul><li><a href="https://lifestraw.com/products/lifestraw-go-series-1l"><strong>Lifestraw water filtering water bottle (liter)</strong></a></li><li>Microfiber towel</li><li>Paper copies of all important documents (passport, visas, credit cards, IDs, vaccination card)</li><li>Earplugs (wax earplugs are the best)</li><li>Eyemask</li><li>Small combination lock (for hostels)</li><li>Earbuds</li><li>Portable charger (<a href="https://www.amazon.com/Anker-PowerCore-Upgraded-PowerIQ-Samsung/dp/B01NBQX0O5">Anker PowerCore II Slim 10,000</a> is great)</li><li>Short charging cord with <strong>USB A </strong>(for hostels and hotels)</li></ul><h3>Nice to Haves</h3><ul><li>Yoga Mat (<a href="https://jadeyoga.com/products/travel-mat">Jade Yoga makes a thin travel mat</a>)</li><li>Massage cork ball (<a href="https://www.amazon.com/Rawlogy-Lightweight-Alternative-Lacrosse-Fasciitis/dp/B07RV6X4YC?th=1">Rawlogy makes a travel size</a>)</li><li>Reusable spork</li><li>Resuable ziplock bag (for leftovers)</li><li>Noise cancelling headphones (<a href="https://www.bose.com/p/headphones/quietcomfort-acoustic-noise-cancelling-headphones/QC-HEADPHONEARN.html">Bose Quiet Comfort</a> are excellent)</li><li>iPad</li><li>Journal</li><li>Art supplies for painting</li><li>Sudoku or crossword</li><li>Longer charging cord</li></ul><h3>Toiletries</h3><p>Not a comprehensive list, but here are a few items I personally love while traveling</p><ul><li>So much sunscreen</li><li>Face moisturizer</li><li>Menstrual cup</li><li>Shampoo and conditioner bars</li><li>Argon oil for hair (if swimming in the ocean)</li><li>Dishsoap (good for getting out stains &amp; cutting odors)</li><li>Powder laundry detergent (handwashing along the way)</li><li>Bug spray</li></ul><h3>Medicine</h3><p>If you are going somewhere with non-potable water in the tap, a water filter is a good idea and so is some mediciation!</p><p><strong>Azithromycin </strong>comes in handy when you contract some gnarly bacteria and need to give your gut a hard reset to save you from days or weeks of illness.</p><p>If you are going to high altitude (8,000 ft +) and have a history of altitude sickness, then<strong> Acetazolamide</strong> will help alleviate some of the symptoms. I spent over a week in Cusco, Peru which rests at 11,000 ft and the medication helped me acclimate so that my stay was actually enjoyable.</p><p><strong>Probiotic</strong> vitamins are an excellent way to keep your gut consistent through all the changing environments and food you eat while traveling.</p><p>While bug spray may be easy to come by, anti-itch cream like <strong>Coritzone</strong> can be hard to come by in places like South America. I was dying with itchy bites and dreamt of some relief for a few weeks.</p><h3>Luggage</h3><p><strong>Carry-on only! </strong>You save so much money by only doing carry-on, it allows you to board planes, trains, buses, and local taxis easily.</p><h4>Pack vs Suitcase</h4><p>I recommend using a backpacking pack because it offers walkability on dirt and cobblestone roads, it centers the weight on your hips, and you can keep it close to your body in sketchier areas.</p><ul><li>Load your pack with the heaviest gear in the middle and center area of the pack.</li><li>Using color-coded stuff sacks or packing cubes with a backpacking pack will save you a TON of time when locating what you need.</li><li>A rain cover is pretty essential, but if you’re cheap like me, a simple plastic poncho will do the trick to keep you and your pack covered</li></ul><p>If you have back issues or just don’t want to use a pack, a softside suitcase offers more room and expandable options. While four wheels may be easier to push around on flat smooth surfaces, a two wheel suitcase is more durable because the wheels are less likely to break off.</p><p>That’s all folks! Please let me know if you think i’ve missed any must-haves that you found valuable in your travels 😺</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f92e7679ff9a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating Material UI into a React NextJS app]]></title>
            <link>https://medium.com/@elanaolson/integrating-material-ui-into-a-react-nextjs-app-55a95e15d767?source=rss-1678fc50ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/55a95e15d767</guid>
            <category><![CDATA[material-ui]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Elana Olson]]></dc:creator>
            <pubDate>Sat, 02 Mar 2024 23:53:13 GMT</pubDate>
            <atom:updated>2024-03-02T23:53:13.083Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s breakdown how to add Material UI to a NextJS app to get you running with it in no time!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zmQq6mFRzO8X78XXd6SuhA.png" /></figure><p><em>You can view the full </em><a href="https://github.com/ellamaolson/react-portfolio-app/commit/ebabdeb56f6ec086985b57a0dde8eb3d4f3aa266"><strong><em>change here</em></strong></a><em> if you’re impatient 😄, it’s part of a larger project for a </em><a href="https://github.com/ellamaolson/react-portfolio-app"><em>react-portfolio-app</em></a><em>.</em></p><p>Start by following the <a href="https://mui.com/material-ui/getting-started/installation/"><strong>general installation guide here</strong></a> where we install Material UI, emotion/react, and emotion/styled for customized css.</p><pre>yarn add @mui/material @emotion/react @emotion/styled</pre><p>We can use <a href="https://emotion.sh/docs/styled">Emotion styled components</a> to define React components with styling attached to them. This makes our code more readable because everything is in a JSX format and the styling is contained in a reusable component.</p><h3><strong>Specific configuration changes for NextJS</strong></h3><p><em>There are three changes we need to make to the application</em></p><ol><li><em>Add App Router</em></li><li><em>Create a theme</em></li><li><em>Consume the theme in a ThemeProvider client-rendered file</em></li></ol><p>We need to install specific dependencies for <a href="https://mui.com/material-ui/integrations/nextjs/"><strong>NextJS integration with Material UI</strong></a>, which involves using the <a href="https://nextjs.org/docs/app">App Router</a> instead of Page Router.</p><pre>yarn add @mui/material-nextjs @emotion/cache</pre><h4>1. Add App Router</h4><p>Add AppRouterCacheProvider to the root layout</p><pre>// app/layout.tsx<br>import { AppRouterCacheProvider } from &#39;@mui/material-nextjs/v13-appRouter&#39;;<br><br>export default function RootLayout({<br>  children,<br>}: Readonly&lt;{<br>  children: React.ReactNode;<br>}&gt;) {<br>  return (<br>    &lt;html lang=&quot;en&quot;&gt;<br>      &lt;body className={inter.className}&gt;<br>        &lt;AppRouterCacheProvider&gt;<br>          {children}<br>        &lt;/AppRouterCacheProvider&gt;<br>      &lt;/body&gt;<br>    &lt;/html&gt;<br>  );<br>}</pre><h4>2. Create a Theme</h4><p>Create a file theme.ts and define the theme to be used by the ThemeProvider as <a href="https://mui.com/material-ui/integrations/nextjs/#theming">outlined in the doc</a>.</p><pre>// app/theme.ts<br>&#39;use client&#39;;<br>import { Roboto } from &#39;next/font/google&#39;;<br>import { createTheme } from &#39;@mui/material/styles&#39;;<br><br>const roboto = Roboto({<br>  weight: [&#39;300&#39;, &#39;400&#39;, &#39;500&#39;, &#39;700&#39;],<br>  subsets: [&#39;latin&#39;],<br>  display: &#39;swap&#39;,<br>});<br><br>const theme = createTheme({<br>  typography: {<br>    fontFamily: roboto.style.fontFamily,<br>  },<br>});<br><br>export default theme;</pre><h4>3. <em>Consume the theme in a ThemeProvider client-rendered file</em></h4><p>Instead of adding the ThemeProvider directly to the root layout.tsx , you’ll need to create a separate file containing ThemeProvider and call that in layout.tsx . We do this because ThemeProvider sets up a client-side context which cannot be rendered server-side, so <a href="https://stackoverflow.com/questions/76181096/typeerror-createcontext-only-works-in-client-components-add-the-use-client-d">we pull the code into its own client-rendered file</a> and call it in layout.tsx .</p><p>In this new file called StyledRoot.tsx, we start the file with ‘use client’ to signify this is a client-side rendered file <a href="https://nextjs.org/docs/app/building-your-application/rendering/client-components#using-client-components-in-nextjs">(read more here)</a>. Here’s what the file will look like:</p><pre>// app/StyledRoot.tsx<br>&#39;use client&#39;;<br>import { ThemeProvider } from &#39;@mui/material/styles&#39;;<br>import theme from &#39;./theme&#39;;<br><br>export function StyledRoot({<br>  children,<br>}: Readonly&lt;{<br>  children: React.ReactNode;<br>}&gt;) {<br>  return (<br>    &lt;ThemeProvider theme={theme}&gt;<br>      {children}<br>    &lt;/ThemeProvider&gt;<br>  );<br>}</pre><p>Then we add it to layout.tsx which will pass child components through to StyledRoot.tsx</p><pre>// app/layout.tsx<br>import { AppRouterCacheProvider } from &#39;@mui/material-nextjs/v13-appRouter&#39;;<br>import { StyledRoot } from &#39;./StyledRoot&#39;;<br><br>export default function RootLayout({<br>  children,<br>}: Readonly&lt;{<br>  children: React.ReactNode;<br>}&gt;) {<br>  return (<br>    &lt;html lang=&quot;en&quot;&gt;<br>      &lt;body className={inter.className}&gt;<br>        &lt;AppRouterCacheProvider&gt;<br>           &lt;StyledRoot&gt;{children}&lt;/StyledRoot&gt;<br>        &lt;/AppRouterCacheProvider&gt;<br>      &lt;/body&gt;<br>    &lt;/html&gt;<br>  );<br>}</pre><p><strong>And that’s it!</strong></p><p>Now you have Material UI up and running with a NextJs app. The next step is to start adding components!</p><p>Start by perusing the <a href="https://mui.com/material-ui/all-components/"><strong>component library</strong></a><strong> </strong>— see what components support your design and look at the code examples for how to implement them!</p><p>Another great resource are the <a href="https://github.com/mui/material-ui/tree/v5.15.11/docs/data/material/getting-started/templates"><strong>Material UI templates</strong></a> which use most of the Material UI components in real world examples. I find these examples to be the most useful — I took a special interest in the <a href="https://github.com/mui/material-ui/blob/v5.15.11/docs/data/material/getting-started/templates/blog/Blog.tsx">Blog template</a> when building my portfolio app.</p><p>That’s all folks! Please let me know if you found this article helpful and if it’s missing any important details!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55a95e15d767" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create an Angular app in no time]]></title>
            <link>https://blog.angular.dev/create-an-angular-app-in-no-time-2ca89c734dd2?source=rss-1678fc50ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ca89c734dd2</guid>
            <category><![CDATA[angular-material]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[angular-for-beginners]]></category>
            <dc:creator><![CDATA[Elana Olson]]></dc:creator>
            <pubDate>Mon, 10 Feb 2020 17:01:01 GMT</pubDate>
            <atom:updated>2020-02-10T20:14:49.492Z</atom:updated>
            <content:encoded><![CDATA[<p>From zero to deployment, we will cover how to quickly create an Angular application. Whether you are learning Angular for the first time, teaching your team Angular, or searching for a fast guide to re-jog your memory, this guide is meant for you. So let’s get started!</p><h4>Visualizing the steps ahead</h4><p>Visually seeing what an Angular application is made of can help you understand the steps in a bigger-picture way as we go through them. I like to know what I am getting into before I go chasing down a rabbit hole and so here is what to expect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/0*9Z8v2FakQvE6K0Zr" /></figure><h3>Step 1: Setting up your dev environment</h3><p>To quickly get your environment up and running, follow these steps to build locally on your own machine.</p><h4>1. Install Node.js</h4><p><a href="https://nodejs.org/en/download/">Download Node.js</a></p><p>*optionally: <a href="https://github.com/nvm-sh/nvm">Install nvm</a> (node version manager) if you want to manage different versions of node for each of your projects.</p><h4>2. Install a package manager to manage your project dependencies.</h4><p>You can use <a href="https://www.npmjs.com/get-npm">npm</a> (node package manager) or <a href="https://classic.yarnpkg.com/en/docs/install/#mac-stable">yarn</a>. Npm already comes installed when you install Node and for this demo we will use npm as our package manager.</p><h4>3. Install the Angular CLI for building and running your app</h4><p>Open your CLI/terminal and go into a directory you want to create your Angular application in, then run:</p><pre>npm install -g @angular/cli</pre><h4>4. Create the initial app using Angular CLI commands</h4><p>Give you project a name, here we are building an application to display different types of fish, so we will name it <em>fish-app</em>. This will take a moment as the Angular CLI initializes everything for the app.</p><pre>ng new fish-app</pre><h4>5. Serve the app</h4><p>Go into the app you just created and serve the app. The app builds to <a href="http://localhost:4200/">http://localhost:4200/</a> and will open automatically.</p><pre>cd fish-app &amp;&amp; ng serve --open</pre><p>You now have a running application that looks like this. Woohoo!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2wUz6oZvRer1kUHX" /><figcaption>Initial app layout before customization</figcaption></figure><p>From here you will be adding your own content and styling to the app. Take a look at app.component.html for You can define all CSS in <em>styling.css</em> and change the root HTML file <em>app.component.html</em> to load custom content.</p><h3>Step 2: Start Building</h3><p>Web applications are broken up into views which control sections of the screen. Angular calls these views <strong>components</strong>. We use the Angular CLI command <em>ng generate component</em> to create custom components that handle larger features like the home page, toolbar, or fish-profile.</p><pre>ng generate component fish-profile</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YHbYNEn7gH94S-JF-46mIg.png" /><figcaption>Components of fish-app’s home page</figcaption></figure><p>This command initializes a TypeScript, HTML, CSS, and Spec file (for testing) for each component, and it will add that component to <strong>app.module.ts</strong>. This last part is very important because it allows the component to be used by all other components within your app by providing it to the root organizer — app.module.ts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0teBIf20mGjVZFFq6N5zDw.png" /><figcaption>Initialized TypeScript file for fish-profile component</figcaption></figure><p>Every component has a <strong>selector </strong>which acts as the unique identifier/name when using a component in an html file. You simply add this selector as seen below to another component’s template (like <em>app.component.html</em>) and now you are using the component.</p><pre>&lt;app-fish-profile&gt;&lt;/app-fish-profile&gt;</pre><p>Notice the component is exported as a class named FishProfileComponent and is added to app.module.ts. All dependencies for the app are imported to the app.module.ts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*umxRgGg3s0my5N9Afnpl2Q.png" /><figcaption>FishProfileComponent added to app.module.ts</figcaption></figure><h4>Utilizing Angular Material</h4><p><a href="https://material.angular.io/">Angular Materia</a>l is a UI component library that provides examples of common-use components like lists, tables, dropdown menus, etc. It follows <a href="https://material.io/design/">Material Design</a> principles to help you quickly implement common interaction patterns. See Angular Material’s <a href="https://material.angular.io/guide/getting-started">installation guide</a> for adding it to your project.</p><p>Let’s take a look at how to use an Angular Material component like Mat-Card:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OYo_5JdIXqKJJJGBEPW54A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kGF9NgzIOdyn2KJAlJ7Q0A.png" /><figcaption>Looping through fishies[] defined in the TypeScript file to create a new mat-card for every fish</figcaption></figure><p>*Angular Material components are always named with this naming scheme: <strong>mat-_____ </strong>(mat-card, mat-menu, mat-list,…)<strong>.</strong></p><h3>Step 3: Navigate Views</h3><p>Onto routing! Routing allows you to serve a SPA (single page application) with multiple urls. SPAs help reduce latency and limit back-and-forth communication to the server by “dynamically rewriting the current page rather than loading an entire new page from the server,” (Wikipedia).</p><p>So let’s add some new urls to our app and see how to implement routing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pEckGkHx3gj3Q5ELp9iWeA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7pLqxSdjocZNM5hHJvwv4g.png" /><figcaption>Adding route links to the menu</figcaption></figure><p>Routes are defined in the app-routing.module.ts or app-module.ts. You need to import the RouterModule and then define the routes. Routes are defined by creating a path that points to a particular component so when that route is referenced, it loads that particular component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2GivpIKMj1k56tTZze49jg.png" /><figcaption>Routes defined directly in app.module.ts</figcaption></figure><p>See the <a href="http://github.com/ellamaolson/fish-app">source code</a> for <em>fish-app</em> to see how the application renders different routes through the router-outlet in <em>app.component.html</em>. The app currently loads FishProfileComponent as the landing page since it is defined as the root path.</p><h3>Step 4: Manage Data</h3><p>Services help components map API calls to fetch data from remote servers. Data is shared by all components via dependency injection through the service.</p><p>A service is defined as a class with functions and data structures used to fetch or house data from a database. It uses Injectable to allow components to <em>inject</em> the service into the component class and utilize its functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uUi9JIYBg7KWEnjTcqXbiw.png" /><figcaption>Angular Service</figcaption></figure><p>Once a service has been <em>injected</em> into a component, all functions and data are accessible to the component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wCI5E8xGSZElTcmiHDv4Gw.png" /><figcaption>Service injected in a component</figcaption></figure><h3>Step 5: Collect User Data</h3><p>Angular Forms enables you to capture and validate user input and track input changes. There are two types of Angular forms — <a href="https://code.tutsplus.com/tutorials/angular-form-validation-with-reactive-and-template-driven-forms--cms-32131">Reactive Forms and Template-Driven Forms</a>.</p><p>The key differences between these two forms is: (1) Reactive forms update the HTML content based on changes made to the component while Template-drive forms derive changes from within the HTML template; (2) Reactive forms are synchronous while Template-driven forms are asynchronous.</p><p>We are using Reactive Forms which allows us to define forms from the component class. Add ReactiveFormsModule to app.module.ts, as well as, MatFormsFieldModule and MatInputModul to use Angular Material forms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i_qCb15rrt6Eg3Ja9H2HdQ.png" /><figcaption>Reactive Forms and Angular Material forms imports</figcaption></figure><p>Now, see how we define a FormGroup that contains several forms for input from the component class and bound in the template. Binding is denoted with [] to identify the formGroup we are using is the submissionForm defined in the component.</p><pre>[formGroup]=&quot;submissionForm&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rZEiDXXzBxymiRpm0x4dVQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oCL_fwLgdxBIbNtwflcFLw.png" /><figcaption>FormGroup with forms: name, description, and image defined within the component and bound in the template</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZdKoBXkaCQy_QKJnmVQRlw.png" /></figure><h3>Step 6: Compile Project &amp; Deploy</h3><p>This step is really up to you since it depends on what you want to do with this web app. Some options are:</p><ul><li>Deploy to Firebase</li><li>Build a 3-tier application with a backend and database</li><li><a href="https://medium.com/@elanaolson/deploying-a-personal-website-to-github-pages-da2af6167f8b">Publish as a website on Github Pages</a></li></ul><p>If you are ready to deploy and need to host some simple data, Firebase may be your answer. Or, if you want to write custom queries and define your own middlewear, then building a 3-tier app could be right for you. Or, if you want to publish this app as a personal or project website, you could deploy onto Github Pages.</p><h4>Deploy to Firebase</h4><p>Firebase is an easy way to host your website and add additional backend capabilities like authentication, data querying, and storage. It takes care of the backend functions for you and allows you to quickly get your web app up and running. Angular has its own library for firebase called <a href="https://github.com/angular/angularfire">angular/fire</a> where you can implement these capabilities for an Angular app.</p><p>Follow these steps for deploying your app to Firebase:</p><p>1. Sign up for a <a href="https://firebase.google.com/">Firebase account</a> and create a project. Your app will be hosted at <a href="https://your-firebase-project-name.firebaseapp.com"><em>https://your-firebase-project-name.firebaseapp.com</em></a><em>.</em></p><p>3. Install Firebase tools</p><pre>npm i -g firebase-tools</pre><p>4. Connect your local Angular project on Firebase</p><pre>firebase login<br>firebase init</pre><p>5. Build project</p><pre>ng build --prod</pre><p>6. Deploy to Firebase</p><pre>firebase deploy</pre><p><em>Viola!</em> You are deployed.</p><h4>Build a 3-tier application</h4><p>Applications can be multi-tiered to separate the user interface from your business logic and data storage. A common architecture is 3-tier where there are presentation, logic, and data tiers.</p><ul><li>Presentation tier (client) is your Angular app rendered by the browser.</li><li>Logic tier (server/middlewear) is another app written in Node.js, Django, Rails, Java, etc to handle authentication, authorization, database queries, and interactions with external APIs.</li><li>Data tier is typically a <a href="https://medium.com/@jon.perera/sql-vs-nosql-a-beginners-guide-f80991f76a4b">SQL or NoSQL</a> database like PostgreSQL or MongoDB.</li></ul><p>One implementation of a 3-tier app is called a <a href="https://medium.com/codingthesmartway-com-blog/angular-6-mean-stack-crash-course-part-2-implementing-the-back-end-642567e16bb9"><strong>MEAN</strong></a> stack. MEAN stands for <strong>M</strong>ongoDB, <strong>E</strong>xpress.js, <strong>A</strong>ngular, <strong>N</strong>ode.js. Angular as the client, Node.js and Express.js as the middlewear, and MongoDB as the NoSQL database.</p><h3>Conclusion</h3><p>Angular is a robust platform that provides you with the tooling to create multifaceted dynamic web applications. <strong>The faster you can get started with Angular, the more you can learn and implement in your project. </strong>My goal is to speed up this initial process by providing a 6-step guide to visually understanding and creating your Angular app.</p><p><strong>Source Code: </strong><a href="https://github.com/ellamaolson/fish-app"><strong>github.com/ellamaolson/fish-app</strong></a></p><p>Let me know what you think and if you have an helpful insights for improving this guide!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ca89c734dd2" width="1" height="1" alt=""><hr><p><a href="https://blog.angular.dev/create-an-angular-app-in-no-time-2ca89c734dd2">How to create an Angular app in no time</a> was originally published in <a href="https://blog.angular.dev">Angular Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a personal website built in Angular to Github Pages]]></title>
            <link>https://blog.angular.dev/deploying-a-personal-website-to-github-pages-da2af6167f8b?source=rss-1678fc50ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/da2af6167f8b</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[github-pages]]></category>
            <dc:creator><![CDATA[Elana Olson]]></dc:creator>
            <pubDate>Mon, 10 Feb 2020 17:01:01 GMT</pubDate>
            <atom:updated>2020-02-28T04:31:39.858Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8na9Au7-617RLoHHWv21BA.jpeg" /></figure><p><a href="https://pages.github.com/">Github Pages</a> allows you to host your own personal or project website for free! Though you cannot run a large business off of it, you can host static websites built with HTML, CSS, and JavaScript. We will take a look at how to deploy an Angular application as your personal website on Github Pages. Here’s my example of hosting on Github Pages — <a href="https://ellamaolson.github.io/">ellamaolson.github.io</a>.</p><h3>Understanding how to use Github Pages</h3><p>Github Pages hosts a website directly from a Github repository by using the <strong>index.html</strong> file as the entry point for hosting your application. If it cannot find this file at the root level, it publishes the <strong>readme.md</strong> instead.</p><p>Personal and organization websites are published from the <em>master</em> branch, while project websites can be published from <em>master</em> or <em>gh-pages </em>branches. See your <strong>Project Settings/Github Pages</strong> to confirm which <strong>Source</strong> branch you can publish from.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MfKUssgiNrzCf8R1eIl3yw.png" /></figure><h3>Building your Angular app for Github Pages</h3><p>Since an Angular app places the index.html within the src/ folder of you app, Github Pages won’t be able to render your app. We need to reconfigure the layout of the app so that the index.html is at the root folder using <a href="https://www.npmjs.com/package/angular-cli-ghpages"><strong>angular-cli-ghpages</strong></a><strong>.</strong></p><pre>npm i -g angular-cli-ghpages</pre><p>Angular-cli-ghpages will render your Angular application into several JavaScript files and an index.html file at the root folder. Therefore, your <em>master </em>branch will serve as a deployment branch and your <em>develop</em> branch will track the development process and hold your actual app.</p><pre>git checkout -b develop</pre><p>Set your default branch to the <em>develop</em> branch so you can see your application code instead of the rendered JavaScript in <em>master.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_zA0Oo6UtyXiGjYqBjtCWw.png" /></figure><h4>Two changes to the Angular app</h4><p>There are two small changes you want to make to your angular code to ensure your JavaScript build is successful.</p><p>First, change the build outputPath in your <strong>angular.json</strong> file to build just to the <strong>dist</strong> folder and not <strong>dist/app</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*xOH1gNFtomaYBktYKOU5JA.png" /></figure><p>Second, make sure all images you reference are saved within <strong>assets/images/.</strong></p><pre>./assets/images/photo.png</pre><p><strong>To learn more about developing an Angular application, read </strong><a href="https://medium.com/@elanaolson/create-an-angular-app-in-no-time-2ca89c734dd2"><strong>how to create an Angular App in no time</strong></a><strong>.</strong></p><h3>Deploying your app</h3><p>Each time you want to deploy to your website, you will pull the changes made in <em>develop</em> to <em>master, </em>build your application, and deploy it to <em>master</em>. This way you keep your development branch clean of rendered JavaScript builds and only deploy to master.</p><pre>git checkout master<br>git pull origin develop<br>ng build --prod --base-href &#39;https://username/repo.github.io/&#39;<br>ng deploy -—branch=master</pre><p>The deployed code on <em>master</em> looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nTFZc9TzDK-zKlXNDdzjdQ.png" /></figure><p>Now make sure to delete those pesky build files from your local <em>develop</em> branch and do not commit them to github. Even though they are deployed to <em>master</em>, the build files will still be created in the <em>develop</em> branch.</p><p>Your <em>develop</em> branch will look something like this — a typical Angular app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qWY0aniyVVcIpafYw7t5Wg.png" /></figure><p><em>Viola!</em> You have your personal website up and running through Github Pages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AvUNAXOH8WjyNgNoP_Ii-A.png" /></figure><p>You can view this code at <a href="https://github.com/ellamaolson/ellamaolson.github.io"><strong>github/ellamaolson/ellamaolson.github.io</strong></a></p><p>I hope this helped you find a faster solution to deploying an Angular app to Github Pages. Please let me know of any other solutions you may have found and comment below!</p><h4>References</h4><ul><li><a href="https://help.github.com/en/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line">Adding an existing project to Github Pages</a></li><li><a href="https://help.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-your-github-pages-site-from-a-docs-folder-on-your-master-branch">Configuring a publishing source</a></li><li><a href="https://stackoverflow.com/questions/39978856/unable-to-change-source-branch-in-github-pages">Stack Overflow — changing source branch</a></li><li><a href="https://dzone.com/articles/deploy-angular-app-on-github-pages">Deploying with <em>master/docs</em> branch</a></li><li><a href="http://www.curtismlarson.com/blog/2015/04/12/github-pages-google-domains/">Adding a custom domain to your github project</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da2af6167f8b" width="1" height="1" alt=""><hr><p><a href="https://blog.angular.dev/deploying-a-personal-website-to-github-pages-da2af6167f8b">Deploying a personal website built in Angular to Github Pages</a> was originally published in <a href="https://blog.angular.dev">Angular Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2 New Tools to help with AngularJS to Angular Migrations]]></title>
            <link>https://blog.angular.dev/migrating-to-angular-fc9618d6fb04?source=rss-1678fc50ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc9618d6fb04</guid>
            <category><![CDATA[angularjs]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[announcements]]></category>
            <dc:creator><![CDATA[Elana Olson]]></dc:creator>
            <pubDate>Tue, 14 Aug 2018 19:04:48 GMT</pubDate>
            <atom:updated>2018-08-14T19:13:20.549Z</atom:updated>
            <content:encoded><![CDATA[<p>Many developers are embarking on the migration journey of bringing AngularJS applications up to modern-day web development standards with Angular, and there are a lot of approaches. It can be challenging to know which upgrading path is right and where to find guidance on how to migrate, but it doesn’t have to be!</p><p>We’re announcing two new tools that will help.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7662Fs3dSpc4S4wdTUvk-g.gif" /></figure><blockquote>Angular is the name for the Angular of today and tomorrow.<br>AngularJS is the name for all 1.x versions of Angular.</blockquote><h3><a href="https://github.com/ellamaolson/ngMigration-Assistant">ngMigration Assistant</a></h3><p>ngMigration Assistant is a command-line tool that analyzes an AngularJS application and recommends a migration path. It provides statistics on the complexity, size, and patterns of an app. It outlines the necessary preparation work for migrating to Angular.</p><p>ngMigration Assistant is designed to supply simple, clear, and constructive guidance for how to migrate your application. It analyzes any AngularJS app — big or small — and makes recommendations about possible approaches that may suit your application. It doesn’t take into account every possibility, but considers some of the most important factors to consider, such as code size/complexity.</p><p>Here’s an example using the <a href="https://github.com/angular/angular-phonecat/tree/step-14">AngularJS phone catalog</a> application. With the simple command <strong><em>ngma </em></strong>with the app directory, we can see an analysis of our app and can see recommendations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TcaQk1xn6pSTXXFIelL00Q.png" /></figure><p>First the tool provides statistics about what was detected in the application. If necessary, preparation steps for migrating to Angular are shown.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zpnbEpod9UIlPBacYD04fQ.png" /></figure><p>To learn more, visit <a href="https://github.com/ellamaolson/ngMigration-Assistant"><strong>ngMigration Assitant</strong></a>.</p><h3><a href="https://github.com/angular/ngMigration-Forum/wiki">ngMigration Forum</a></h3><p>The new ngMigration Forum is a community hub that provides a starting place to find information about migration paths, tools, and to consolidate some of the best information and experts from the web.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hjACtCH_KwkLlpoTDs30Hg.png" /></figure><p>ngMigration Forum is geared towards answering your migration questions, identifying useful tools, and directing you to a migration solution. It is a place to learn, discuss, and share information on migrating to Angular.</p><p>In the Forum, you will find a array of useful information ranging from explanations of why upgrading is important from a technical and business perspective to an overview of the available migration paths.</p><p>There are many migration paths (many of which can be combined) covered in the forum, and we hope that the community will work together to share their experiences and expertise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*ZlaCbYJVQElCh0MD3LSy1A.png" /></figure><p>For each migration path, you can read more in depth and learn about how each one works, awesome tools to help, examples, helpful content, and consultants available to help you throughout the migration process.</p><p>Finally, we want developers to ask and answer questions surrounding migrating all in one place through the Issues tab. Here, you can review previously asked issues and support the community through useful insights.</p><p>ngMigration Forum is the place to bring all our thoughts and insights together, to share useful information and awesome tools.</p><p>To learn more, visit <a href="https://github.com/angular/ngMigration-Forum/wiki"><strong>ngMigration-Forum</strong></a>.</p><p>If you have an AngularJS project you are considering migrating to Angular, download the ngMigration Assistant, visit the ngMigration Forum, and share your experiences so we can continue to make this process better.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc9618d6fb04" width="1" height="1" alt=""><hr><p><a href="https://blog.angular.dev/migrating-to-angular-fc9618d6fb04">2 New Tools to help with AngularJS to Angular Migrations</a> was originally published in <a href="https://blog.angular.dev">Angular Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>