<?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 Janzen Zarzoso on Medium]]></title>
        <description><![CDATA[Stories by Janzen Zarzoso on Medium]]></description>
        <link>https://medium.com/@jzarzoso?source=rss-f864e2caa0e7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*Dk_QF5C0m3BE8qAV0Ta6WQ.jpeg</url>
            <title>Stories by Janzen Zarzoso on Medium</title>
            <link>https://medium.com/@jzarzoso?source=rss-f864e2caa0e7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 05:01:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jzarzoso/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[React Conf 2017 Highlights]]></title>
            <link>https://medium.com/@jzarzoso/react-conf-2017-bullets-6211be2ee934?source=rss-f864e2caa0e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/6211be2ee934</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[reason]]></category>
            <category><![CDATA[ocaml]]></category>
            <category><![CDATA[reactconf]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Janzen Zarzoso]]></dc:creator>
            <pubDate>Sat, 18 Mar 2017 10:23:30 GMT</pubDate>
            <atom:updated>2017-03-21T14:20:08.550Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aKPAUu7Zvv87om7JQRPe2w.png" /><figcaption>From <a href="http://conf.reactjs.org/">React Conf ’17</a> logo</figcaption></figure><p>These are the highlights I found at React Conf ‘17 done last March 13–14.</p><h4>React Fiber</h4><p>This is gonna be the reimplementation of React’s core algorithm. Tom Occhino said they are gonna make the React core easy to contribute to and will be written in <a href="https://flowtype.org/">Flow</a>. So I think it is about time to study and practice writing in Flow especially if you want to contribute to the core. However, React Fiber isn’t ready for prime time yet as of this writing but we’re close to getting <a href="http://isfiberreadyyet.com/">there</a> so better watch out for it.</p><h4>Making things simple with tools and frameworks:</h4><p>JS Fatigue is real and sometimes it’s not just a state of mind but literally a physical fatigue. I remember at one point when I was trying to setup all the known tools and libraries in order to modernize my React project I had to learn a bunch of stuff Webpack, Redux, Redux-Thunk, Reselect, Normalizr, etc. One JS library leads to another and I literally got sick. So here are great tools to bootstrap your React development and hopefully get rid of JS fatigue, or not:</p><p><a href="https://github.com/facebookincubator/create-react-app">Create React App</a> is a cli tool which will bootstrap your React App project so you won’t have to do it from scratch.</p><p>Also if you think you need more than just a tool to bootstrap your React App and need a framework to work on a certain way, <a href="https://github.com/zeit/next.js">Next.js</a> would probably be for you.</p><blockquote>Next.js is a minimalistic framework for server-rendered React applications.</blockquote><p>which to me looks promising.</p><p><a href="https://nuclide.io/">Nuclide</a> is a also another tool when writing in <strong>Flow, </strong>too bad it’s only available on <strong>Atom</strong> at the moment.</p><p>If you are using <a href="https://getexponent.com/">Exponent</a>, they just released a very cool playground called <a href="https://sketch.expo.io/">Expo Sketch</a> which I think is really helpful when trying out an experiment, learning something new and IMO, the best use-case is replicating part of your code and share it to people you need help from.</p><p>Last but definitely not the least, <a href="https://github.com/facebook/reason">Reason</a>.</p><blockquote>Friendly Syntax &amp; Toolchain Powered by OCaml</blockquote><p>There were too many important points on this topic by Cheng Lou so I’m gonna leave that explaining to <a href="https://youtu.be/_0T5OSSzxms?list=PLb0IAmt7-GS3fZ46IGFirdqKTIxlws7e0">him</a>.</p><p>I skipped some of the topics, so I’m probably gonna go back to this article and update it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6211be2ee934" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting ESLint on Meteor for React Development]]></title>
            <link>https://medium.com/@jzarzoso/setting-eslint-on-meteor-for-react-development-10af658b44e2?source=rss-f864e2caa0e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/10af658b44e2</guid>
            <category><![CDATA[eslint]]></category>
            <category><![CDATA[meteor]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Janzen Zarzoso]]></dc:creator>
            <pubDate>Mon, 13 Mar 2017 07:45:46 GMT</pubDate>
            <atom:updated>2018-03-28T00:29:32.704Z</atom:updated>
            <content:encoded><![CDATA[<p>There have been countless debates among developers when to use Single or Double quotes, whether end each statement with semicolon, and what about the block styling? To avoid ego clashes, <a href="http://eslint.org/">ESLint</a> is a great tool to mediate the this trivial task.</p><p>So here is my attempt to document what I did to enable `ESLint` on a Meteor Development with React.</p><p>As recommended by Meteor we’re going to <a href="https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb">Airbnb ESLint Config</a>, these are predefined rules from their style guide.</p><p>First we need to install the necessary packages for this to work:</p><pre>meteor npm install --save-dev babel-eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-meteor eslint-plugin-react eslint-plugin-jsx-a11y eslint-import-resolver-meteor eslint</pre><p>I’m going to discuss what each package will do:</p><p><strong>babel-eslint</strong> — this will be used as our parser.<br><strong>eslint-config-airbnb</strong> – this package will mostly specify our styling guide.<br><strong>eslint-plugin-import</strong> — which allows our ESLint to add plugins<br><strong>eslint-plugin-meteor</strong> – The plugin that we’ll use for Meteor specific validations.<br><strong>eslint-plugin-react</strong> — This plugin is required by AirBnb’s style guide.<br><strong>eslint-plugin-jsx-a11y</strong> — This is also required by the AirBnb package, we won’t be touching this in this session.<br><strong>eslint-import-resolver-meteor</strong> — for import specific rules.<br><strong>eslint</strong> — last but not the list the package that will encapsulate all of the above.</p><p>Now you can setup your ESLint configuration inside your `package.json` file or use the separate `.eslintrc.json`. I like using the latter because it’s reusable and can be shared among other projects.</p><p>Here’s a minimal sample for your .eslintrc.json</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a04513d4f4db5a6fddba2b8a318e142d/href">https://medium.com/media/a04513d4f4db5a6fddba2b8a318e142d/href</a></iframe><p>Now let’s try creating a simple React component and test our ESLint config against.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fd306786fed3f856f81d2eea28fad480/href">https://medium.com/media/fd306786fed3f856f81d2eea28fad480/href</a></iframe><p>Now in your terminal run the ESLint command:</p><pre>./node_modules/.bin/eslint --quiet MyComponent.js</pre><p>You should see an error like this:</p><pre>  3:1  error  Component should be written as a pure function  react/prefer-stateless-function<br>  6:7  error  JSX not allowed in files with extension &#39;.js&#39;   react/jsx-filename-extension</pre><pre>✖ 2 problems (2 errors, 0 warnings)</pre><p>Now if you are like me and doesn’t like to use .jsx extensions you can add this option in your ESLint config:</p><pre>&quot;rules&quot;: {<br>  &quot;react/jsx-filename-extension&quot;: [1, { &quot;extensions&quot;: [&quot;.js&quot;] }]<br>}</pre><p>Rerun the ESLint command again, now there should only be one error left and that is because our Component is stateless. We have an option to add state or use the Pure Function syntax, example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/938672d0e4b3f220519b2177b70165c6/href">https://medium.com/media/938672d0e4b3f220519b2177b70165c6/href</a></iframe><p>Voila! We have successfully configured our ESLint for Meteor. As your app grows you will notice problems along the way and you might have to configure your linter further, so I’m going to add in here some of common cases that I usually encounter developing for Meteor with React.</p><pre>{<br>    &quot;env&quot;: {<br>        &quot;browser&quot;: true,<br>        &quot;es6&quot;: true<br>    },<br>    &quot;parser&quot;: &quot;babel-eslint&quot;,<br>    &quot;extends&quot;: [<br>      &quot;airbnb&quot;,<br>      &quot;plugin:meteor/recommended&quot;<br>    ],<br>    &quot;parserOptions&quot;: {<br>        &quot;allowImportExportEverywhere&quot;: true<br>    },<br>    &quot;plugins&quot;: [<br>        &quot;meteor&quot;<br>    ],<br>    &quot;settings&quot;: {<br>      &quot;import/resolver&quot;: &quot;meteor&quot;<br>    },<br>    &quot;rules&quot;: {<br>        &quot;indent&quot;: [<br>            &quot;error&quot;,<br>            2<br>        ],<br>        &quot;quotes&quot;: [<br>            &quot;error&quot;,<br>            &quot;single&quot;,<br>            // To allow Template Literals inside Component props.<br>            // ex. &lt;Component width={`50%`}/&gt;<br>            //<br>            { &quot;allowTemplateLiterals&quot;: true }<br>        ],<br>        &quot;react/jsx-filename-extension&quot;: [&quot;error&quot;, { &quot;extensions&quot;: [&quot;.js&quot;] }],<br>        // To allow absolute path imports in Meteor<br>        &quot;import/no-absolute-path&quot;: [<br>          &quot;off&quot;<br>        ],<br>        // To resolve https://github.com/clayne11/eslint-import-resolver-meteor/issues/17<br>        &quot;import/extensions&quot;: [<br>          &quot;off&quot;,<br>          &quot;never&quot;<br>        ],<br>        // Work around until  https://github.com/benmosher/eslint-plugin-import/issues/479 is resolved<br>        &quot;import/no-extraneous-dependencies&quot;: [<br>          &quot;off&quot;<br>        ],<br>        // To allow `_id` access when retrieving Mongo documents<br>        &quot;no-underscore-dangle&quot;: [<br>          &quot;off&quot;<br>        ]<br>    }<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10af658b44e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning Redux (note to self)]]></title>
            <link>https://medium.com/@jzarzoso/learning-redux-note-to-self-5fa65ce5eaa6?source=rss-f864e2caa0e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fa65ce5eaa6</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Janzen Zarzoso]]></dc:creator>
            <pubDate>Sat, 14 Jan 2017 04:03:40 GMT</pubDate>
            <atom:updated>2017-01-14T04:07:47.311Z</atom:updated>
            <content:encoded><![CDATA[<p>These are my notes learning Redux, some phrases are directly copied from the Redux documentation but I will try to update this next time and make it more personalized. #note-to-self</p><h3>Tips</h3><ul><li>Start with one file for your app to easily identify the relationships of the Actions &gt; Reducers &gt; Store</li><li>If you need to, spell out the variables, don’t neglect the tedium of learning what’s inside each abstraction.</li></ul><p>Here’s a quick diagram of how a Redux workflow: Root Reducer -&gt; store.dispatch() [Actions (Action Creators)] -&gt; (Old) Store -&gt; Reducers (Entire State) -&gt; (New) Store -&gt; Components -&gt; (Repeat)</p><h3>Actions</h3><p>Actions are payloads of information that send data from the application to the store. They are the only source of information for the store. There are two types of Actions:</p><ul><li>Action Type (Constants)</li><li>Action Creators (Creates the Actions to be done by the Reducers)</li></ul><h3>Reducers</h3><p>Action specifies the work to be done while Reducers do the work and mutate the state. In my own understand, the Reducers define the data structure of your state.</p><p>Redux provides a utility called combineReducers() which basically creates a single Reducer from a bunch of Reducers, this is how it works:</p><pre>export default function todoApp(state = {}, action) {<br>  return {<br>    visibilityFilter: visibilityFilter(state.visibilityFilter, action),<br>    todos: todos(state.todos, action)<br>  }<br>}</pre><p>To this:</p><pre>const todoApp = combineReducers({<br>  visibilityFilter,<br>  todos<br>})</pre><p>The output of a Reducer is just a Javascript Object that consists the mutated state (not modified because it’s an entirely new instance of the old one).</p><h3>Store</h3><p>Notice the singular word Store unlike the Actions &amp; Reducers. In Redux there should only be ONE Store to manage your Application State, it is a ONE source of truth which I think is the gist of Redux. This is important in order to understand your Application State easily and so you can have an overview of the current State of your Application. A Store is just a container of your Application’s State (both UI and Data).</p><p>To initialize the Store we can do:</p><pre>const initialState = {<br>    dummy: &#39;This does not matter, this will be overwritten by<br>            what is returned by the root reducer or todosReducer <br>            in this case.&#39;<br>}</pre><pre>const store = createStore(todosReducer, initialState)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fa65ce5eaa6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>