<?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 Esther Atebije (Falayi) on Medium]]></title>
        <description><![CDATA[Stories by Esther Atebije (Falayi) on Medium]]></description>
        <link>https://medium.com/@estherfalayi?source=rss-e2629a884e48------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bC15d4HSvyt6fF6m8r1VFQ.jpeg</url>
            <title>Stories by Esther Atebije (Falayi) on Medium</title>
            <link>https://medium.com/@estherfalayi?source=rss-e2629a884e48------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 08:01:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@estherfalayi/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[Setting Up Webpack for Bootstrap 4 and Font-Awesome (updated)]]></title>
            <link>https://medium.com/@estherfalayi/webpack-4-nicknamed-legato-is-out-and-the-community-is-still-on-the-hots-for-it-i-am-too-e9bee3d2e4a?source=rss-e2629a884e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9bee3d2e4a</guid>
            <category><![CDATA[bootstrap-4]]></category>
            <category><![CDATA[font-awesome]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[webpack]]></category>
            <dc:creator><![CDATA[Esther Atebije (Falayi)]]></dc:creator>
            <pubDate>Wed, 04 Jul 2018 11:32:13 GMT</pubDate>
            <atom:updated>2023-10-16T13:38:46.560Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W7tRUkUZHmFyt5ykeTXLiQ.png" /><figcaption>This is an update to a <a href="https://medium.com/@estherfalayi/setting-up-webpack-for-bootstrap-4-and-font-awesome-eb276e04aaeb">Webpack tutorial I wrote a while back</a>.</figcaption></figure><p>Webpack 4 (nicknamed Legato 😄) is out and the community is still on the hots for it. I am too! 😎</p><p>For one, it is super fast. I had to blink a couple of times at the bundling speed. How did that happen! Lol. Anyway, this tutorial isn’t about Webpack 4 so I won’t dwell much on it — rather, it’s an update to a <a href="https://medium.com/@estherfalayi/setting-up-webpack-for-bootstrap-4-and-font-awesome-eb276e04aaeb">tutorial I wrote on Webpack (sometime last year)</a>. Let’s dive in.</p><p>First and foremost, you should install <strong>Webpack 4</strong> and its new buddy — <strong>webpack-cli</strong>.</p><pre>npm install webpack webpack-cli --save</pre><p>Install the following dependencies required for the webpack configuration.</p><pre>npm install css-loader sass-loader file-loader url-loader node-sass transfer-webpack-plugin extract-text-webpack-plugin@4.0.0-beta.0 image-webpack-loader jquery --save-dev</pre><p><strong>Note</strong>: If you are like me and you use extract-text-webpack-plugin , news flash: extract-text-webpack-plugin ≤3.0.2 has not been updated for Webpack 4 at the moment. However, there’s a patch available for now: extract-text-webpack-plugin@4.0.0-beta.0 . Another alternative is <a href="https://github.com/webpack-contrib/mini-css-extract-plugin"><strong>mini-css-extract-plugin</strong></a><strong> </strong>.</p><p><strong>Configure Webpack for Bootstrap 4</strong></p><ul><li>Create a webpack.config.js file and configure webpack as you would normally do. Here’s a sample below.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/85657e0177a7223c9ee5fd713cebd9ff/href">https://medium.com/media/85657e0177a7223c9ee5fd713cebd9ff/href</a></iframe><ul><li>Install the following Bootstrap 4 dependencies for Webpack.</li></ul><pre>npm install bootstrap popper.js autoprefixer precss exports-loader imports-loader postcss-loader --save</pre><ul><li>Create a postcss.config.js file and write the code below. This file is required by postcss-loader.</li></ul><pre><em>module</em>.<em>exports</em> = {};</pre><ul><li>Automatically load modules for jQuery, popper, and Bootstrap javascript components. This will be done with <a href="https://webpack.js.org/plugins/provide-plugin/">ProvidePlugin</a> of Webpack. You might not need some Bootstrap components, though. You can check out <a href="https://github.com/shakacode/bootstrap-loader">Bootstrap-loader</a> on how to turn off some of these components.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d5a1079ca5e91d555544e7bb01d98856/href">https://medium.com/media/d5a1079ca5e91d555544e7bb01d98856/href</a></iframe><ul><li>In your javascript entry file (depending on your project stack: React, Angular, Vue, etc), ensure you import/require bootstrap.</li></ul><pre>import &#39;bootstrap&#39;;</pre><pre><strong>OR</strong></pre><pre>require(&#39;bootstrap&#39;);</pre><ul><li>Require precss and autoprefixer in your config file.</li></ul><pre>const autoprefixer = require(&#39;autoprefixer&#39;);<br>const precss = require(&#39;precss&#39;);</pre><ul><li>Add rules for css and scss files.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/57d467b5eb6b785ca483a56f60830f67/href">https://medium.com/media/57d467b5eb6b785ca483a56f60830f67/href</a></iframe><ul><li>Add another rule for bootstrap files.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/28d3b5f423a60009066771024229469c/href">https://medium.com/media/28d3b5f423a60009066771024229469c/href</a></iframe><p><strong>Configure Webpack for FontAwesome</strong></p><ul><li>Install font-awesome-loader and font-awesome.</li></ul><pre>npm install font-awesome-loader --save-dev<br>npm install font-awesome --save</pre><ul><li>Create a font-awesome.config.js file and write the following code.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6cd9efa80105954e456d0ff559a03ba2/href">https://medium.com/media/6cd9efa80105954e456d0ff559a03ba2/href</a></iframe><ul><li>Add Font Awesome scss file in your entry point.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/508476a73df52cb0b15cf847aa4d5257/href">https://medium.com/media/508476a73df52cb0b15cf847aa4d5257/href</a></iframe><ul><li>In your webpack.config.js file, add the following rule for Font Awesome</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c9cee4c3f3227eb36dba8cee1bde124a/href">https://medium.com/media/c9cee4c3f3227eb36dba8cee1bde124a/href</a></iframe><p>Here’s the full webpack configuration file</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b92c503e598986416e4537a4fc195caf/href">https://medium.com/media/b92c503e598986416e4537a4fc195caf/href</a></iframe><p><strong>Note:</strong> This tutorial is for Webpack 4. If you still use Webpack 3, don’t worry, I’ve got you covered 👍. Check out this <a href="https://medium.com/@estherfalayi/setting-up-webpack-for-bootstrap-4-and-font-awesome-eb276e04aaeb">tutorial</a> I wrote sometime last year. I hope this post was helpful 😄.</p><p>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9bee3d2e4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Modal Component: The Redux Way]]></title>
            <link>https://medium.com/backticks-tildes/creating-a-modal-component-the-redux-way-cf9f4c5497dd?source=rss-e2629a884e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf9f4c5497dd</guid>
            <category><![CDATA[bootstrap]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Esther Atebije (Falayi)]]></dc:creator>
            <pubDate>Fri, 08 Jun 2018 17:33:40 GMT</pubDate>
            <atom:updated>2023-06-13T12:30:51.403Z</atom:updated>
            <content:encoded><![CDATA[<p><em>You know what? I think I’m in love. I can’t seem to get enough of Bootstrap 4! </em>😊</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*pNo-gap4uUyDvkvN97wx-A.gif" /></figure><p>However, as much as I love Bootstrap 4, there are times I don’t want to use all of its components or classes. I might want to create my own Bootstrap theme and forgo all of the JS components.</p><p>A short story…</p><p>So I began creating my components the React way….and alas! I realised I needed a modal! Crap, I didn’t forsee that. I’m using Redux, I’m stuck and don’t know how to create a modal. Do I have to write jQuery?</p><p>Quick answer: No, you don’t 💥.</p><p>The above was a scenario I encountered some days ago. Google and I had a very long discussion and we finally agreed that the <a href="https://stackoverflow.com/a/35641680">Redux approach</a> was the best way to create a modal component in React. I mean, it’s just smooth.</p><p>Don’t panic. It’s quite straight forward. Let’s take a quick dive.</p><p><strong>Setup Project</strong></p><p>Setup your React project like you normally would. For this little experiment, I setup the project using <a href="https://github.com/facebook/create-react-app#creating-an-app">create-react-app</a>. Run the following command:</p><pre>npx create-react-app redux-modal-component<br>cd redux-modal-component</pre><p><strong>Setup Redux</strong></p><p>I wrote a tutorial on <a href="https://medium.com/backticks-tildes/setting-up-a-redux-project-with-create-react-app-e363ab2329b8">setting up Redux with create-react-app (CRA)</a>.</p><p><strong>Creating the Modal</strong></p><p>We’ll need two major packages for our badass component: <strong>react-modal</strong> — for modal accessibility — and <strong>bootstrap</strong> — for styling.</p><pre>npm install react-modal --save<br>npm install bootstrap --save</pre><p><strong>Modal Actions</strong></p><ul><li>Define redux action types: For this project I used <a href="https://www.npmjs.com/package/keymirror">keymirror</a>.</li></ul><pre>npm install keymirror --save</pre><p>In constants folder, create an ActionTypes.js file and define your modal action types. Basically, you want to show and hide your modal.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e9b53aa17e895043225745212ce44dad/href">https://medium.com/media/e9b53aa17e895043225745212ce44dad/href</a></iframe><ul><li>Create the Redux action creators</li></ul><p>To make the modal component reusable and dynamic, we’ll define modalProps and modalType parameters. modalProps will be an <em>object</em> of modal properties (e.g title, message, button click functions, etc) and modalType will be a <em>string</em> specifying the type of modal (e.g confirm, prompt, delete, etc).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3f6e6a7a7e33fd14b0af3af635a568cb/href">https://medium.com/media/3f6e6a7a7e33fd14b0af3af635a568cb/href</a></iframe><p><strong>Modal Reducer</strong></p><p>Here we define how the application state changes with respect to the modal action triggered.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f5580c38a9106778c56970b8e163afa1/href">https://medium.com/media/f5580c38a9106778c56970b8e163afa1/href</a></iframe><p><strong>Modal Types</strong></p><p>Now, these will just be presentational components. Define them in src/components/Modals/ . Here’s an example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3293169b92ba41c20f50a43086a4fbfb/href">https://medium.com/media/3293169b92ba41c20f50a43086a4fbfb/href</a></iframe><p>Create other modal components: depending on your design pattern, you could have just one component that renders different modals with respect to the props given.</p><p><strong>The ModalRoot</strong></p><p>This is the modal container component and it will be called just once — in the entry file. It will also be connected to the redux store. This would allow it access modal props in state.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1287cd86a1172fb1df8c816a5df69e91/href">https://medium.com/media/1287cd86a1172fb1df8c816a5df69e91/href</a></iframe><p><strong>Activate Modal</strong></p><p>In App.js , import the modal actions and connect the component to the redux store. Why? — we want to dispatch our modal actions.</p><pre>const mapDispatchToProps = dispatch =&gt; ({ <br> hideModal: () =&gt; dispatch(hideModal()),<br> showModal: (modalProps, modalType) =&gt; {<br>  dispatch(showModal({ modalProps, modalType }))<br> }<br>})</pre><ul><li>Add a button component and set an onClick function:</li></ul><pre>&lt;button<br> className=&quot;btn btn-outline-primary btn-block&quot;<br> onClick={this.openAlertModal}<br>&gt;alert&lt;/button&gt;</pre><ul><li>Define the onClick function:</li></ul><pre>openAlertModal(event) {<br>  this.props.showModal({<br>   open: true,<br>   title: &#39;Alert Modal&#39;,<br>   message: MESSAGE,<br>   closeModal: this.closeModal<br> }, &#39;alert&#39;)<br>}</pre><ul><li>Start the project. Run npm start in your terminal (your project should be running on port 3000). Click on the button displayed. Your modal should look like this:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PnpRGYzcIXiUVW3EX4Zp4w.png" /><figcaption>Cool, right? 😎…but it can be better 😉</figcaption></figure><p>Now, let’s add our Bootstrap classes.</p><ul><li>React-modal is very customisable, hence we can add Bootstrap classes. It has props which can be used to define these classes. Add the following props to &lt;ReactModal /&gt; component:</li></ul><pre>overlayClassName=&quot;modal fade show&quot;<br>bodyOpenClassName=&quot;modal-open&quot;<br>className=&quot;modal-dialog modal-dialog-centered&quot;</pre><ul><li>Import your modal types in ModalRoot and display the modalType specified in props:</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ddfbfbecca517f982f0a2b8b0856694a/href">https://medium.com/media/ddfbfbecca517f982f0a2b8b0856694a/href</a></iframe><p>Start the project, click on the button and see our modal appear 😄</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*Sx42wGGBfTepBD-G7qyfXQ.gif" /><figcaption>I played around a bit with the bootstrap classes 😉</figcaption></figure><p><strong>Conclusion</strong></p><p>The coolest thing about this approach is that the modal component is not imported in every instance it’s being called. It’s only called once — in the entry file. All that is required is to call the modal function and voilà! Importing the modal component in every instance it’s called is also fine but I prefer this approach better. It’s neater.</p><p>What are your thoughts on this approach? Let’s discuss. And yeah, I created a <a href="https://github.com/efalayi/redux-modal-component">Github repo</a> for this experiment too 😉. Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf9f4c5497dd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/backticks-tildes/creating-a-modal-component-the-redux-way-cf9f4c5497dd">Creating a Modal Component: The Redux Way</a> was originally published in <a href="https://medium.com/backticks-tildes">Backticks &amp; Tildes</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Twenty-Six Story]]></title>
            <link>https://medium.com/@estherfalayi/a-twenty-six-story-e003c7bf4c58?source=rss-e2629a884e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/e003c7bf4c58</guid>
            <category><![CDATA[andela]]></category>
            <category><![CDATA[friendship]]></category>
            <category><![CDATA[team]]></category>
            <dc:creator><![CDATA[Esther Atebije (Falayi)]]></dc:creator>
            <pubDate>Wed, 02 May 2018 23:49:04 GMT</pubDate>
            <atom:updated>2018-06-07T15:53:45.663Z</atom:updated>
            <content:encoded><![CDATA[<p>I like writing.</p><p>It helps me think…reflect on things, events…articulate my thoughts…transform them into soothing strings of alphabets...Almost therapeutic 😃. You know another thing that’s almost therapeutical? Discovering something (or someone) new… Yeah.</p><p>So this day, 365 days ago, I met 12 amazing people…Let’s take a trip down memory lane…</p><p>You see, I’m quite introverted in so many ways. My social life can be described as non-existent. Lol. But true, though. This changed when I got invited to <a href="https://medium.com/@estherfalayi/and-the-going-continues-part-1-8751974f4625">Andela’s BootCamp</a>. It was an experience I’d never forget. If I hadn’t made it into the fellowship, I knew I’ll still be happy with the person I’d discovered (me 😃). Luckily I made it but I did not. Confusing, right? Okay, let me explain.</p><p>Yeah, I made it into the fellowship but I couldn’t resume with my fellow cycle mates. I still had NYSC to complete and well, Andela is EPIC. During the period of my “NYSC completion” phase (which felt like the longest four months of my life), I thought I’d never get into the Andela Fellowship after all. Little did I know that fate had a pleasant surprise waiting for me.</p><p>I resumed into <a href="https://medium.com/@estherfalayi/the-new-andela-fellow-3dd4dceb2ddf">Andela fellowship on May 2, 2017 with 12 other individuals</a>. There weren’t fireworks, trust me. I was scared. Very. I mean, I didn’t know these people. Also, being from the same bootcamp, they had already bonded. I felt like a stranger in their midst. But I reminded myself I had a place with them and Cohort 26 referred to all of us. It helped 💪</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A9NptylCuLuNBsp0w3pNTA.jpeg" /><figcaption>My 26 lovelies! 😍</figcaption></figure><p>365 days later, I’m still with my people. We’ve overcome hurdles we thought we couldn’t, we’ve grown together. We’ve become not only a team but also a family. I have since discovered that:</p><p>Efe (Mr. Awesome) is witty and can charm his way out of any situation with his infectious smile. Now I protect myself. Ehehehe.</p><p>Blessing (The invincible) is like the breeze on the beach. Never seen but strongly felt 😉.</p><p>Audax (Oga Chinedu) is a pool of ideas. A natural problem solver. Our banter is just awesome (I know he’ll argue this though 😄) and I wouldn’t trade that for anything.</p><p>Bamidele (Mr Humanity) has the speed of Flash and a special gift of convincing you that anything can be learnt and done.</p><p>Celestine (Able TTL) has the right words to say to you at any time. My go-to man 😘</p><p>Mazi (The humble one) has the special gift of making any tense situation calm. It’s like he breathes out calmness.</p><p>Itunu (Big Daddy) has a soothing presence. I know everything will be fine when I see him around.</p><p>Mayowa (The Boss) is the spice and life of any gathering and will probably help with my social life (if I allow him. Lol).</p><p>JB (Protector of the universe) is the protector of our realm 😎 🙌</p><p>Dhani (That guy 😉)is our charismatic and charming dude. A sweet-talker, I tell you. You can reach me if you want more details.</p><p>Memuna (Awesome Dictator) has the leadership totem and is the glue 😘.</p><p>And together we make an awesome team. I love you guys. Let’s do more years together! Cheers 🥂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e003c7bf4c58" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up a Redux Project With Create-React-App]]></title>
            <link>https://medium.com/backticks-tildes/setting-up-a-redux-project-with-create-react-app-e363ab2329b8?source=rss-e2629a884e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/e363ab2329b8</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[create-react-app]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Esther Atebije (Falayi)]]></dc:creator>
            <pubDate>Mon, 02 Apr 2018 18:10:42 GMT</pubDate>
            <atom:updated>2023-06-15T13:11:53.004Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8KHwJKuAoC0ABSp_S0BZtw.png" /></figure><p><strong>A Byte About Redux</strong></p><p>Redux is definitely the new cool 😎 — state management made easy with just a single state tree. Although it’s been largely associated with React, Redux can also be used with other view libraries (e.g Vue, Meteor, Angular, etc). Luckily, setting it up with Create-React-App (CRA) is quite straight forward.</p><p><strong>The Project Setup</strong></p><p>You can set up your project in two ways.</p><p>1.) Install create-react-app globally (for older versions of npm). This provides a CLI command — <strong>create-react-app </strong>— to create a project.</p><pre>npm install -g create-react-app</pre><p>To create a new project, simply type the CLI command (create-react-app) plus the name of your project (in my case, <strong>redux-cra ) </strong>and hit enter 😎</p><pre>create-react-app redux-cra</pre><p>2.) Alternatively, you can use <strong>npx</strong> — this is a new binary that comes alongside <a href="https://github.com/npm/npm/releases/tag/v5.2.0">npm v5.2 and above</a>. To create a new project, just prepend npx before create-react-app redux-cra. This installs <strong>create-react-app</strong> globally (if it has not been installed) and also creates a new project.</p><pre>npx create-react-app redux-cra</pre><p>Now that your project is setup, we can begin hacking (Lol). In your terminal (<em>or CLI. I prefer to use terminal though </em>🙂), do the following:</p><pre>cd redux-cra<br>npm start</pre><p>This should start your project on port <strong>3000</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-utBF_m_5wBoPEZpEuaT3w.png" /></figure><p><strong>A Glimpse of a CRA Project Folder Structure</strong></p><p>Your newly created project’s folder structure should be similar to the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4DLlqJQWCAdLh63i-HYw3w.png" /></figure><p><strong>Note:</strong> For your project to build, the following files must exist with exact filenames:</p><ul><li><strong>public/index.html</strong> is the page template;</li><li><strong>src/index.js</strong> is the JavaScript entry point.</li></ul><p><strong>Redux Setup</strong></p><p>To setup Redux, these packages are required: <strong>redux</strong>, <strong>react-redux</strong>, and <strong>redux-thunk</strong>. Why? The answers are simple.</p><ol><li><strong>redux</strong> is the core that performs the magic 😄</li><li>By default, React bindings are not included in Redux. With <strong>react-redux </strong>, these bindings will be explicitly installed.</li><li><strong>redux-thunk </strong>is a middleware that allows you to write action creators (we’ll get to this in a bit) that return a function. The returned function receives two store (we’ll also talk more on this) methods: <strong>dispatch</strong> and <strong>getState</strong> as parameters. If you’re still unsure about the purpose of <strong>redux-thunk</strong>, you can read Dan Abramov’s reference to it <a href="http://stackoverflow.com/questions/35411423/how-to-dispatch-a-redux-action-with-a-timeout/35415559#35415559">here</a>.</li></ol><p>Now that you understand the purposes of these packages, let’s install them.</p><pre>npm install redux react-redux redux-thunk --save</pre><p><strong>Action Creators</strong></p><p>People often use <strong>actions</strong> and <strong>action creators</strong> interchangeably. On the contrary, they are two different entities. <strong>Actions</strong> are payloads of information which send data to the store. Essentially, they are JavaScript objects. What makes a particular action unique is the <strong>type</strong> key defined in it.</p><p>Yeah, you guessed right — an action <strong>must</strong> have a <strong>type</strong> key. The <strong>type</strong> indicates the type of action being performed.</p><p>On the other hand, <strong>action creators</strong> are functions that create <strong>actions</strong> — they simply return actions. For manageability and ease, <strong>redux-thunk</strong> allows you to write them as functions that return a function (a callback? 🤔).</p><p>Moving forward, action creators will be defined in an <strong>actions</strong> folder in <strong>src </strong>(you can choose to name yours differently — name it “action-creators”, “action-initiators”, etc. They are also cool 😎).</p><pre><strong>/*<br> src/actions/simpleAction.js<br>*/</strong></pre><pre>export const simpleAction = () =&gt; dispatch =&gt; {<br> dispatch({<br>  type: &#39;SIMPLE_ACTION&#39;,<br>  payload: &#39;result_of_simple_action&#39;<br> })<br>}</pre><p><strong>Reducers</strong></p><p>These describe how the application state changes with respect to actions dispatched to the Redux store.</p><p>Create a <strong>reducers</strong> folder in <strong>src</strong> and define reducers for your app actions. Here’s an example of reducer:</p><pre><strong>/*<br> src/reducers/simpleReducer.js<br>*/</strong></pre><pre>export default (state = {}, action) =&gt; {<br> switch (action.type) {<br>  case &#39;SIMPLE_ACTION&#39;:<br>   return {<br>    result: action.payload<br>   }<br>  default:<br>   return state<br> }<br>}</pre><p>Using the <a href="https://redux.js.org/api-reference/combinereducers"><strong>combineReducers</strong></a> utility from <strong>redux, </strong>you can combine all reducers in the app into a single index reducer. For this project, we’ll reference this index reducer as <strong>rootReducer.</strong> In your <strong>reducers </strong>folder, create <strong>rootReducer.js</strong> and import all reducers defined for your app actions.</p><pre><strong>/*<br> src/reducers/rootReducer.js<br>*/</strong></pre><pre>import { combineReducers } from &#39;redux&#39;;<br>import simpleReducer from &#39;./simpleReducer&#39;;</pre><pre>export default combineReducers({<br> simpleReducer<br>});</pre><p><strong>Redux Store</strong></p><p>Essentially, the Redux store does the following:</p><ul><li>Holds application state</li><li>Allows access to state via <a href="https://redux.js.org/api-reference/store#getState">getState()</a>. The <strong>getState</strong> method returns the current state tree of your app.</li><li>Allows state to be updated via <a href="https://redux.js.org/api-reference/store#dispatch">dispatch(action</a>) . The <strong>dispatch</strong> method “dispatches” an action, consequently triggering a state change.</li><li>Registers listeners via <a href="https://redux.js.org/api-reference/store#subscribe">subscribe(listener</a>) . The <strong>subscribe(listener) </strong>adds a change listener. Similar to Flux’s change listener methods.</li><li>Handles unregistering of listeners via the function returned by <a href="https://redux.js.org/api-reference/store#subscribe">subscribe(listener)</a>.</li></ul><p><strong>Note:</strong> A Redux application needs only one store.</p><p>In src folder, create a store.js file and configure the Redux store. You can also define an <strong>initialState</strong> parameter in the <strong>configureStore</strong> method.</p><pre><strong>/*<br> * src/store.js<br> * No initialState<br>*/</strong></pre><pre>import { createStore, applyMiddleware } from &#39;redux&#39;;<br>import thunk from &#39;redux-thunk&#39;;<br>import rootReducer from &#39;./reducers/rootReducer&#39;;</pre><pre>export default function configureStore() {<br> return createStore(<br>  rootReducer,<br>   applyMiddleware(thunk)<br> );<br>}</pre><p>The defined <strong>initialState</strong> of the store can either be an empty object or an object with initial key values. Here’s an example:</p><pre><strong>/*<br> * src/store.js<br> * With initialState<br>*/</strong></pre><pre>import { createStore, applyMiddleware } from &#39;redux&#39;;<br>import thunk from &#39;redux-thunk&#39;;<br>import rootReducer from &#39;./reducers/rootReducer&#39;;</pre><pre>export default function configureStore(initialState={}) {<br> return createStore(<br>   rootReducer,<br>   initialState,<br>   applyMiddleware(thunk)<br> );<br>}</pre><p><strong>Provide Store</strong></p><p>The Redux store is all setup but the application has no access to it yet. This is handled using the <strong>Provider</strong> React binding from <strong>react-redux</strong>. To make the store available to every component in the app, it makes sense to call this binding in the app’s entry point, in this case, <strong>index.js </strong>. Provider takes <strong>store</strong> and <strong>children </strong>as props. Calling <strong>configureStore()</strong> method from <strong>src/store.js</strong> creates the Redux store, which is passed as props to <strong>Provider</strong>.</p><pre><strong>/*<br> src/index.js<br>*/</strong></pre><pre>import React from &#39;react&#39;;<br>import ReactDOM from &#39;react-dom&#39;;<br>import { Provider } from &#39;react-redux&#39;<br>import configureStore from &#39;./store&#39;;</pre><pre>import &#39;./index.css&#39;;<br>import App from &#39;./App&#39;;<br>import registerServiceWorker from &#39;./registerServiceWorker&#39;;</pre><pre>ReactDOM.render(<br> &lt;Provider store={configureStore()}&gt;<br>  &lt;App /&gt;<br> &lt;/Provider&gt;,<br> document.getElementById(&#39;root&#39;)<br>);<br>registerServiceWorker();</pre><p><em>Start the app. All should still work fine </em>😄</p><p><strong>Connect React Component to Store</strong></p><p>This will be done using the<strong>connect</strong> React binding from <strong>react-redux .</strong></p><pre><strong>/*<br> src/App.js<br>*/</strong></pre><pre>import React, { Component } from &#39;react&#39;;<br>import { connect } from &#39;react-redux&#39;;</pre><pre>import logo from &#39;./logo.svg&#39;;<br>import &#39;./App.css&#39;;</pre><pre>class App extends Component {<br> render() {<br>  return (<br>   &lt;div className=&quot;App&quot;&gt;<br>    &lt;header className=&quot;App-header&quot;&gt;<br>     &lt;img src={logo} className=&quot;App-logo&quot; alt=&quot;logo&quot; /&gt;<br>     &lt;h1 className=&quot;App-title&quot;&gt;Welcome to React&lt;/h1&gt;<br>    &lt;/header&gt;<br>    &lt;p className=&quot;App-intro&quot;&gt;<br>     To get started, edit &lt;code&gt;src/App.js&lt;/code&gt; and save to reload<br>    &lt;/p&gt;<br>   &lt;/div&gt;<br>  );<br> }<br>}</pre><pre>export default connect()(App);</pre><p><strong>connect</strong> takes in two parameters: <strong>mapStateToProps</strong> and <strong>mapDispatchToProps</strong>. These will be discussed in a bit. For now, let’s import an action to test.</p><pre><strong>/*<br> src/App.js<br>*/</strong></pre><pre>import { simpleAction } from &#39;./actions/simpleAction&#39;;</pre><p><strong>Map Redux State to Component Props</strong></p><p>The <strong>mapStateToProps</strong> parameter of <strong>connect</strong> allows the React component to subscribe to Redux state updates.</p><pre><strong>/*<br> src/App.js<br>*/</strong></pre><pre>const mapStateToProps = state =&gt; ({<br> ...state<br>})</pre><p><strong>Map Dispatch Function to Component Props</strong></p><p>The <strong>mapDispatchToProps</strong> parameter of <strong>connect</strong> can either be:</p><ol><li>an object of action creators wrapped into a dispatch.</li><li>a function with a dispatch parameter. The function should return an object that uses dispatch to bind action creators. Alternatively, you can use the <a href="https://redux.js.org/api-reference/bindactioncreators"><strong>bindActionCreators()</strong></a> helper from <strong>redux</strong></li></ol><pre><strong>/*<br> src/App.js<br>*/</strong></pre><pre>const mapDispatchToProps = dispatch =&gt; ({<br> simpleAction: () =&gt; dispatch(simpleAction())<br>})</pre><p><strong>Update Connect Function Parameters</strong></p><p>Passing mapStateToProps and mapDispatchToProps as connect parameters merges the action creators and store updates to the component’s props and can be accessed using this.props<strong>.</strong></p><pre><strong>/*<br> src/App.js<br>*/</strong></pre><pre>export default connect(mapStateToProps, mapDispatchToProps)(App);</pre><p><strong>Test App</strong></p><p>Now, let’s test that the store is connected and all works as intended. Add a button to App.js</p><pre><strong>/*<br> src/App.js<br>*/</strong></pre><pre>&lt;button&gt;Test redux action&lt;/button&gt;</pre><ul><li>Create a function that will be called when the button is clicked. This function should also dispatch an action to the Redux store. Here, we’ll dispatch <strong>simpleAction</strong> defined in <strong>mapDispatchToProps</strong>.</li></ul><pre><strong>/*<br> src/App.js<br>*/</strong></pre><pre>simpleAction = (event) =&gt; {<br> this.props.simpleAction();<br>}</pre><ul><li>Bind function to button’s onClick event</li></ul><pre><strong>/*<br> src/App.js<br>*/</strong></pre><pre>&lt;button onClick={this.simpleAction}&gt;Test redux action&lt;/button&gt;</pre><ul><li>Add a <strong>pre</strong> tag so you can view changes in component props</li></ul><pre><strong>/*<br> src/App.js<br>*/</strong></pre><pre>&lt;pre&gt;<br> {<br>  JSON.stringify(this.props)<br> }<br>&lt;/pre&gt;</pre><ul><li>Test button click</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*cQnJEPl6O7HM7pDsXhCscQ.gif" /></figure><p><strong>Conclusion</strong></p><p>Using CRA is awesome when you need to get your project up and running ASAP. However, if you want some degree of control over your webpack config, I suggest setting up your React project from scratch 😎 (<a href="https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-eject">or just eject the config </a>😃).</p><p>Link to GitHub repo: <a href="https://github.com/efalayi/redux-cra">https://github.com/efalayi/redux-cra</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e363ab2329b8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/backticks-tildes/setting-up-a-redux-project-with-create-react-app-e363ab2329b8">Setting Up a Redux Project With Create-React-App</a> was originally published in <a href="https://medium.com/backticks-tildes">Backticks &amp; Tildes</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Testing Your React Component With Jest and Enzyme]]></title>
            <link>https://medium.com/backticks-tildes/testing-your-react-component-with-jest-and-enzyme-276eef45bea0?source=rss-e2629a884e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/276eef45bea0</guid>
            <category><![CDATA[enzyme]]></category>
            <category><![CDATA[components]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Esther Atebije (Falayi)]]></dc:creator>
            <pubDate>Thu, 14 Sep 2017 17:06:57 GMT</pubDate>
            <atom:updated>2023-06-15T12:35:15.280Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IotxQS_A5CCOmbHIoiyw4Q.jpeg" /></figure><h3>Introduction</h3><p>So you have created your react application. All seems to work as expected. However, you can never be too sure. Hence, testing your app becomes a necessity. There are quite a number of testing frameworks for javascript applications: <a href="https://github.com/avajs/ava">Ava</a>, <a href="https://mochajs.org/">Mocha</a>, <a href="https://jasmine.github.io/">Jasmine</a>, <a href="https://facebook.github.io/jest/">Jest</a>, and so on. I recommend Jest for your React application.</p><p><strong>Why Jest?</strong></p><p>Jest seems to be gaining much popularity in the Javascript-React community because of its easy ‘out-of-the-box’ setup, manual mocking integration, and snapshot testing ability. As it is, it was specifically designed to test React applications.</p><p>In addition, “<a href="https://facebook.github.io/jest/">Jest parallelizes test runs across workers to maximize performance. Console messages are buffered and printed together with test results. Sandboxed test files and automatic global state resets for every test so no two tests conflict with each other.</a>”</p><p>Therefore, in this tutorial, we’ll walk through a step-by-step guide on how to test your React components using the Jest testing framework and Enzyme.</p><p><strong>Setup</strong></p><p>The first thing you want to do is install Jest and Enzyme. Type the following command in your terminal:</p><pre>npm install jest enzyme --save-dev</pre><p>After installation, create a <strong>__tests__ </strong>folder in your app. This would contain all tests to be written for the app. “Why ‘<strong>__tests__’</strong>?” you’d say. Well, that’s the recommended folder naming convention adopted in Jest.</p><p><strong>Testing React Components</strong></p><p>Testing React components is quite easy with Snapshot Testing (this a useful test tool that ensures UI components do not change unexpectedly). Basically, Snapshot Testing involves analysing how app components change over time.</p><p>Luckily, Jest makes Snapshot Testing effortless. In Jest, a snapshot test case for a React component renders the component, takes a screenshot of the rendered component, and compares it with a referenced image stored during the test. The test fails if the screenshot and referenced image do not match. In such an instance, the change was either unexpected or the component was updated (in which case, the snapshot also needs to be updated).</p><p>For this tutorial, I’ve created a simple ToDo app which displays an input field, a button, and a table. You can view the app on <a href="https://github.com/efalayi/todo-app">GitHub</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uvqf8xQ7iXRznxJe1O4dmA.png" /><figcaption>Screenshot of ToDo App</figcaption></figure><p>The button component (labelled ‘ADD ITEM’) is defined below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8644da8bbfb85d4e029f0fa95f4d0838/href">https://medium.com/media/8644da8bbfb85d4e029f0fa95f4d0838/href</a></iframe><p>A simple snapshot test for this component can be defined as below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/60decfdb3bea6a9381be3d9590b0d03c/href">https://medium.com/media/60decfdb3bea6a9381be3d9590b0d03c/href</a></iframe><p>Sometimes, a snapshot error such as the image below might occur:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rXEWaGIu9YsDwUSZEA2oeA.png" /><figcaption>Component snapshot test error</figcaption></figure><p>To fix this error, run jest —-updateSnapshot. This updates the snapshot and reference image.</p><p><strong>Testing the Button Component Further</strong></p><p>You can also test for particular properties in your component snapshot test. This is where Enzyme comes in. Enzyme is a JavaScript Testing utility for React that makes it easier to assert, manipulate, and traverse your React Components’ output. You can write assertion tests for certain properties and values in your component. For instance, the following code asserts that Button component has a name.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/56e4405f1cb5839562cf82a0ae4b3066/href">https://medium.com/media/56e4405f1cb5839562cf82a0ae4b3066/href</a></iframe><p><strong>Testing a Button Click Event</strong></p><p>To test a click event, Jest provides a manual mocking functionality that allows us to create mock functions. A mock function can be as simple as</p><pre><strong>const mockFn = jest.fn()</strong>;</pre><p>Also a click event can be simulated with Enzyme using the simulate() function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd790e952f57ef9bd5b200b2339b6ab6/href">https://medium.com/media/cd790e952f57ef9bd5b200b2339b6ab6/href</a></iframe><p><strong>Some Handy Jest Methods</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f26c9b3f04575c78f29fe0579ab22565/href">https://medium.com/media/f26c9b3f04575c78f29fe0579ab22565/href</a></iframe><p><strong>Important Testing Tips</strong></p><ol><li>Ensure your test suites and cases clearly communicate what is being tested.</li><li>Ensure your test file contains test cases for a single component or function</li><li>Ensure that the test file name matches the component being tested.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=276eef45bea0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/backticks-tildes/testing-your-react-component-with-jest-and-enzyme-276eef45bea0">Testing Your React Component With Jest and Enzyme</a> was originally published in <a href="https://medium.com/backticks-tildes">Backticks &amp; Tildes</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up Webpack for Bootstrap 4 and Font Awesome]]></title>
            <link>https://medium.com/@estherfalayi/setting-up-webpack-for-bootstrap-4-and-font-awesome-eb276e04aaeb?source=rss-e2629a884e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb276e04aaeb</guid>
            <category><![CDATA[font-awesome]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[bootstrap-4]]></category>
            <dc:creator><![CDATA[Esther Atebije (Falayi)]]></dc:creator>
            <pubDate>Sat, 02 Sep 2017 09:10:27 GMT</pubDate>
            <atom:updated>2018-07-04T11:35:40.259Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*kytNiBu7_bfpuv3tFNT_mw@2x.png" /><figcaption><em>‘Setting up Webpack for Bootstrap 4 and FontAwesome is quite easy when you know how’ — Esther Falayi, 2017</em></figcaption></figure><p>Recently, I stumbled on Bootstrap 4, read through the beautifully-put-together documentation (which was quite detailed) and I got thinking of a way to use Bootstrap’s npm package. You see, I’ve always used the CDN link and life has been easy. But hey, it doesn’t hurt to try something different. While I was still nibbling on the <em>‘bootstrap-npm-setup</em>’ thought, I added another thought: “Why don’t I use the Font Awesome npm package?”. Then I got busy.</p><p>I took up a recent project I’d designed with Material UI and started to break down structures. Lol. It’s still funny how easy it is to destroy things. Mind you, I did not destroy my project — I worked on a small section. So there I was, looking confused — I had done everything. I mean, I had installed everything and I was still getting errors from webpack! Errrghh.</p><p>Eventually, I fixed the errors and I decided to write this tutorial to help you avoid some errors I encountered.</p><p>First and foremost, ensure that the following packages have been installed in your project folder. If not, you have to install them as they will be required in our webpack configuration.</p><pre>npm install css-loader sass-loader file-loader url-loader node-sass extract-text-webpack-plugin transfer-webpack-plugin image-webpack-loader jquery --save-dev</pre><p><strong>Configure Webpack for Bootstrap 4</strong></p><ul><li>Create a webpack.config.js file and configure webpack as you would normally do. Here’s a sample below.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c188afd19836cd88bcdcf91e6479ddfb/href">https://medium.com/media/c188afd19836cd88bcdcf91e6479ddfb/href</a></iframe><ul><li>Install the following Bootstrap 4 dependencies for Webpack.</li></ul><pre>npm install bootstrap@4.0.0-beta tether popper.js autoprefixer precss exports-loader imports-loader postcss-loader --save</pre><ul><li>Create a postcss.config.js file and write the code below. This file is required by postcss-loader.</li></ul><pre><em>module</em>.<em>exports</em> = {};</pre><p><em>This line would save me from a postcss-loader error later on.</em></p><ul><li>In your webpack.config.js file, include tether as an entry point (This is not compulsory but it ensures that tether is loaded immediately).</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8a71fa32ed2cf6241b640f0086a3739c/href">https://medium.com/media/8a71fa32ed2cf6241b640f0086a3739c/href</a></iframe><ul><li>Automatically load modules for jQuery, tether, popper, and Bootstrap javascript components. This will be done with <a href="https://webpack.js.org/plugins/provide-plugin/">ProvidePlugin</a> of webpack. You might not need some Bootstrap components, though. You can check out <a href="https://github.com/shakacode/bootstrap-loader">Bootstrap-loader</a> on how to turn off some of these components.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/97f01b6cd1000c3b219411e23da9a2da/href">https://medium.com/media/97f01b6cd1000c3b219411e23da9a2da/href</a></iframe><ul><li>In your javascript entry file (depending on your project stack: react, angular, etc), ensure you import/require bootstrap.</li></ul><pre>import &#39;bootstrap&#39;;</pre><pre><strong>OR</strong></pre><pre>require(&#39;bootstrap&#39;);</pre><ul><li>Require precss and autoprefixer in your config file.</li></ul><pre>const autoprefixer = require(&#39;autoprefixer&#39;);<br>const precss = require(&#39;precss&#39;);</pre><ul><li>Add rules for css and scss files.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4a3e3504798ccfb43180460b9a1a6e6d/href">https://medium.com/media/4a3e3504798ccfb43180460b9a1a6e6d/href</a></iframe><ul><li>Add another rule for bootstrap files.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e8246fa4ce3dba3165985a304dfe05bd/href">https://medium.com/media/e8246fa4ce3dba3165985a304dfe05bd/href</a></iframe><p><strong>Configure Webpack for FontAwesome</strong></p><ul><li>Install font-awesome-loader and font-awesome.</li></ul><pre>npm install font-awesome-loader --save-dev<br>npm install font-awesome --save</pre><ul><li>Create a font-awesome.config.js file and write the following code.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/98d89dd29131962fcd99e1672ece93a2/href">https://medium.com/media/98d89dd29131962fcd99e1672ece93a2/href</a></iframe><ul><li>Add Font Awesome scss file in your entry point.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e3706239542d207458fd33106681e6fb/href">https://medium.com/media/e3706239542d207458fd33106681e6fb/href</a></iframe><ul><li>In your webpack.config.js file, add the following rule for Font Awesome</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a6eff27533eed3a1d00e4868edf4268d/href">https://medium.com/media/a6eff27533eed3a1d00e4868edf4268d/href</a></iframe><p>Here’s the full webpack configuration file</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b7aea70e76687a334aeb36e7043a0a2c/href">https://medium.com/media/b7aea70e76687a334aeb36e7043a0a2c/href</a></iframe><p>You can find all codes used in this tutorial in a repo I created on <a href="https://github.com/efalayi/wbf-starter-config">GitHub</a>. At the moment of writing, I used Webpack 3. Good news though, I’ve updated this tutorial for Webpack 4 and it’s been published! 🎉 🎉 🎉. <a href="https://medium.com/@estherfalayi/webpack-4-nicknamed-legato-is-out-and-the-community-is-still-on-the-hots-for-it-i-am-too-e9bee3d2e4a">Do check it out</a> 😉.</p><p>I hope this tutorial helps you in setting up Webpack (with Bootstrap 4 and Font Awesome) for your next project. Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb276e04aaeb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The New Andela Fellow]]></title>
            <link>https://medium.com/@estherfalayi/the-new-andela-fellow-3dd4dceb2ddf?source=rss-e2629a884e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/3dd4dceb2ddf</guid>
            <category><![CDATA[africa]]></category>
            <category><![CDATA[induction]]></category>
            <category><![CDATA[andela-fellowship]]></category>
            <category><![CDATA[andela]]></category>
            <dc:creator><![CDATA[Esther Atebije (Falayi)]]></dc:creator>
            <pubDate>Fri, 05 May 2017 03:02:37 GMT</pubDate>
            <atom:updated>2017-05-06T03:11:05.758Z</atom:updated>
            <content:encoded><![CDATA[<p>Nice title right? Yeah. <a href="https://medium.com/@estherfalayi/and-the-going-continues-part-1-8751974f4625">After a rigorous bootcamp, I made it into the fellowship</a>. On 02/05/2017, I resumed at the Andela Epic Tower, Lagos as a Software Developer. Honestly, I thought that day would never come…</p><p>As I walked into the Andela office, I couldn’t help but feel so much happiness and excitement. And I wasn’t the only one who felt this way though... My cohort members were equally bubbling with excitement — another chapter of our lives was about to be written. We were warmly welcomed by older fellows who also eagerly shared their experiences in Andela and as new fellows who were very hungry for any information, we happily consumed the tales.</p><p>To aid our transition into the organisation, we were briefed about Andela. While Kate Igori explained the structure, global and local teams, and policies of the organisation, I was once again reminded of Andela’s core values — <strong>E</strong>xcellence, <strong>P</strong>assion, <strong>I</strong>ntegrity, and <strong>C</strong>ollaboration. In that moment, I said to myself: “Andela is a movement: a movement to evenly distribute brilliance <strong>and </strong>opportunity”.</p><p>As the day progressed each member of the Lagos Leadership Team (LLT) had a session with the new cohort. From the sessions I understood that Andela is a non-discriminatory employer of labour. Who cares about your race, sex, title etc when we’re on a mission to change the world? I mean, who cares. I also gathered that Andela is also a reserve of talents who are willingly to provide support when needed.</p><p>I knew Andela wasn’t kidding when the Technology and Leadership team commenced their session. Work was to start immediately. The party was over. LOL. The Learning Loop was about to be intialised. Learning would go at a fast pace and I would have to be on top of it. No time to slack or complain. We’re on a mission to change the world.</p><p>There. That’s it. It’s day 4 today and I’m learning React. I’m confident it will be an amazing journey here…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dd4dceb2ddf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Adapted!]]></title>
            <link>https://medium.com/@estherfalayi/i-adapted-994f5d86b23e?source=rss-e2629a884e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/994f5d86b23e</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[andela-bootcamp-nigeria]]></category>
            <category><![CDATA[challenge]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Esther Atebije (Falayi)]]></dc:creator>
            <pubDate>Mon, 05 Dec 2016 09:40:01 GMT</pubDate>
            <atom:updated>2018-04-07T20:16:02.475Z</atom:updated>
            <content:encoded><![CDATA[<p>Challenges, they say, make you stronger. This is certainly my testimony after 8 days in the Andela Cycle XVII Bootcamp. I’ve been introduced to a whole new world of programming, technologies, techniques and terms I was not familiar with.</p><p>In my first week I had to learn Git and Test Driven Development (TDD) principle in 24hrs. All I knew before bootcamp was just git add, git commit, and git push. I didn’t understand either the basics of git or the importance of head and branching. Luckily, the Self Learning Clinic eliminated some of my ignorance. Projects just have to be ‘gitted’ (Lol).</p><p>Knowing the importance of git encouraged and ‘gingered’ me to want to know more about this powerful version control technology. I wasn’t satisfied with the limited keywords I had in my git vocabulary….I started searching. Google is always a dear. Today, I can git just about anything! (even that book i plan to write soon).</p><p>TDD is another aspect that challenged me. I was used to just writing programs. Why TDD? TDD was, however, important in software development but I had no single clue about it. In addition, the asserts and expects seemed confusing and my programs just refused to pass the tests on AndeLabs. After two trials on AndeLabs, it dawned on me to understand the simple basics of TDD. After that, I learnt Chai. Now, I prefer ‘expects’ to ‘asserts’. Smiles.</p><p>As I scaled through each challenge, I felt like I was fixing the right piece in my puzzle. My brain felt (and is still feeling) charged. One thing is sure though; understanding the importance of learning git and TDD allowed responding to these challenges easy. I didn’t see them as challenges anymore. Rather, they were opportunities for me to learn and be better. <em>Don’t be afraid of challenges. Learn.</em></p><p>Some might ask: “Did you ever think of calling it quits?” Yes, I did… At times when PHCN decided to be annoying, when internet was wacky and when my laptop started displaying some “<em>acrobatics</em>”. However, these setbacks didn’t erase my vision. I see myself becoming an awesome UI/UX developer (a world class developer), working with top companies in the world (like Google and Microsoft), and having my own tech company. I know this vision can’t happen overnight. Therefore, every challenge I overcome brings me one step closer to achieving my dreams.</p><p>So let the challenges come; I’ll take them heads on. Why? I have a motive…my vision.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=994f5d86b23e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[And the Going Continues (Part 3) — me.assert();]]></title>
            <link>https://medium.com/@estherfalayi/and-the-going-continues-part-3-me-assert-5faf3a91e848?source=rss-e2629a884e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/5faf3a91e848</guid>
            <category><![CDATA[growth-mindset]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[andela-bootcamp-nigeria]]></category>
            <category><![CDATA[es6]]></category>
            <dc:creator><![CDATA[Esther Atebije (Falayi)]]></dc:creator>
            <pubDate>Wed, 30 Nov 2016 14:44:47 GMT</pubDate>
            <atom:updated>2018-04-04T19:26:50.335Z</atom:updated>
            <content:encoded><![CDATA[<pre>(function(){<br>  function Self(firstName, lastName, level){<br>    this.firstName= firstName;<br>    this.lastName= lastName;<br>    this.level= level;<br>    this.fullName;<br>    if(level === undefined){<br>      this.level= 0;<br>    }<br>    this.setFullName= function() {<br>      this.fullName= this.firstName + &quot; &quot; + this.lastName;<br>    }<br>    this.getFullName= function(){<br>      return this.fullName;<br>    }<br>  }<br>  <br>  var status = {<br>    &quot;stage 1&quot;: “passed”,<br>    &quot;stage 2&quot;: “passed”,<br>    &quot;stage 3&quot;: “passed”,<br>    &quot;stage 4&quot;: {<br>      &quot;self clinic&quot;: “completed”,<br>      &quot;home sessions&quot;:{<br>        &quot;day 1&quot;: “completed”,<br>        &quot;day 2&quot;: “completed”,<br>        &quot;day 3&quot;: “completed”<br>      },<br>      &quot;status&quot;: &quot;passed&quot;<br>    }<br>  };<br>  <br>  Self.prototype.isEvolving= function(status){<br>    var evolving = 0;<br>    for(var key in status){<br>      if(status[key] === &#39;passed&#39; || <br>        status[key].status === &#39;passed) {<br>          evolving++;<br>      }<br>    }<br>    if (evolving !== 0) { return true; }<br>    else{ return false; }<br>  }<br>  <br>  Self.prototype.assert= function(){<br>    var person= this;<br>    var name= person.getFullName();<br>    <br>    if(person.isEvolving(status)){<br>      console.log(name+” will be a world class developer.”);<br>    }<br>  };<br>  <br>  var me = new Self(“Esther”, “Falayi”, 0);<br>  me.setFullName();<br>  me.assert();</pre><pre>})();</pre><p>//output: “Esther Falayi will be a world-class developer.”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5faf3a91e848" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[And the Going Continues (Part 2) — git help]]></title>
            <link>https://medium.com/@estherfalayi/and-the-going-continues-part-2-git-help-664a6d499a05?source=rss-e2629a884e48------2</link>
            <guid isPermaLink="false">https://medium.com/p/664a6d499a05</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[growth-mindset]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[andela-bootcamp-nigeria]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Esther Atebije (Falayi)]]></dc:creator>
            <pubDate>Tue, 29 Nov 2016 14:21:16 GMT</pubDate>
            <atom:updated>2017-11-29T08:04:40.571Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*l2ENddvu6NHpY1cxiNjOcQ.png" /><figcaption>git that project asap!</figcaption></figure><p>After three failed branches and merges — including stupid commits — I’m finally getting the hang of Git. Just as Bram Stoker said: “We learn from failure, not from success!”</p><p>Learning git wasn’t totally fun! Sincerely. I thought my laptop would crash at certain instances but then Google was there to save the day(and <a href="https://medium.com/@_larikraun">Omolara Adejuwon</a> *winks*). I’ve made mistakes, I’ve learnt from them, and I’d like to share some tips I gathered.</p><ol><li>First and foremost, you just have to git that project. Imagine if I had not, I would have started all over again. Please learn git (or any other version control system) today.</li><li>When creating a repository, include a <strong>.gitignore</strong> file. Trust me when I say you’ll need it.</li><li>Create <strong>branches</strong> when you want to make major changes.</li><li>Use <strong>git status</strong> to check files that have changed and you’d like to commit.</li><li>Never forget <strong>git reset</strong> — saves lives every time.</li><li>Always check which branch you are currently on (use <strong>git branch</strong>).We don’t want to mess up the master now, do we?</li><li>Write clear commit message! The <strong>README.md</strong> file can also be used to document changes you make. Remember collaboration; your team members need to understand your actions or the updates you are making.</li><li>Finally, you might want to also remember <strong>rm –f .git/index.lock</strong>. It saved me a couple of times. It’s just annoying when you mistakenly add/merge some files, then you realise this and try to delete manually (being a novice et al), then you can’t git add or git push anything again! LOL. I’ve been there. <em>“rm -f .git/index.lock”</em> saved the day.</li><li>Remember the basic rules: git status → git add → git commit → git push</li></ol><p>So there. The going is still going on…a world-class developer is being groomed. Be expectant.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=664a6d499a05" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>