<?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 Michael Lampe on Medium]]></title>
        <description><![CDATA[Stories by Michael Lampe on Medium]]></description>
        <link>https://medium.com/@mlampesd?source=rss-e8197d0fc3dc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*UxSkxEfbymM5rjN9.</url>
            <title>Stories by Michael Lampe on Medium</title>
            <link>https://medium.com/@mlampesd?source=rss-e8197d0fc3dc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 15:27:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mlampesd/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[Seedux, A New Way to Visualize & Debug your React-Redux Application]]></title>
            <link>https://medium.com/@mlampesd/seedux-a-new-way-to-visualize-debug-your-react-redux-application-927d4523b555?source=rss-e8197d0fc3dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/927d4523b555</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[react-redux]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[react-redux-devtools]]></category>
            <category><![CDATA[devtools]]></category>
            <dc:creator><![CDATA[Michael Lampe]]></dc:creator>
            <pubDate>Tue, 20 Dec 2016 17:57:49 GMT</pubDate>
            <atom:updated>2016-12-21T22:16:58.386Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*TbMoL_tJqZf2Cf4eaKB8Bg.png" /></figure><p>Seedux brings data flow visualization to the React-Redux ecosystem while offering a full suite of troubleshooting tools. By replacing a few import statements from Redux and React-Redux, Seedux maps out and illuminates the interwoven relationships between your containers, action creators, and reducers. Seedux provides numerous features for solo developers and teams to improve their debugging workflow, including:</p><ul><li>Time travel functionality for your application’s Redux store.</li><li>Persistent log of every action dispatched, resulting store differences, and complete new store.</li><li>Configurable visualization of your application’s containers, action creators, reducers using a variety of filters.</li><li>Illumination of relevant containers, actions creators and reducers upon action dispatch.</li><li>Ability to dispatch actions with custom payloads.</li><li>Import/Export and Stash/Unstash complete store logs from disk or localStorage.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*JgKJ1GuwjuDGgezKKndc4A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*EKGBkDPnybe__9ApBo1cQQ.png" /><figcaption>Screenshots showcasing Seedux’s visualizer and store transaction logger in action!</figcaption></figure><p>As React-Redux developers ourselves, we’d love to hear your feedback on our tool. Please visit <a href="http://seedux.net/">our website</a>, <a href="https://github.com/reduxify/seedux">GitHub repository</a>, and <a href="https://www.npmjs.com/package/seedux">NPM page</a> for more information and to get started debugging with Seedux today.</p><p>Created by: <a href="https://github.com/bartlett705">bartlett705</a>, <a href="https://github.com/mlampedx">mlampedx</a>, and <a href="https://github.com/srei">srei</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=927d4523b555" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why won’t it render? Reconciling D3 and React DOM]]></title>
            <link>https://medium.com/@mlampesd/why-wont-it-render-reconciling-d3-and-react-dom-5c1b29c26c9f?source=rss-e8197d0fc3dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c1b29c26c9f</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[3d]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Michael Lampe]]></dc:creator>
            <pubDate>Thu, 08 Dec 2016 01:21:04 GMT</pubDate>
            <atom:updated>2016-12-08T01:34:44.606Z</atom:updated>
            <content:encoded><![CDATA[<p>The D3 library is JavaScript’s most popular open-source visualization generator. With dozens of examples ranging from visualizing a genetic algorithm to displaying global refugee flows, D3 is a powerful engine for creating a stunning graphical representation of any qualitative or quantitative dataset. D3 leverages a highly customizable API for its numerous chart-types, enabling a developer to create vector graphics with their design of choice by providing a properly formatted data structure. For developers using frameworks that leverage virtual DOMs, such as React, D3’s heavy reliance on DOM manipulation conflicts with the stringent rules of the virtual DOM.</p><p>I recently found myself seeking a solution to reconcile D3 with React while working on a developer tool. I researched a number of React D3 libraries, which use customized React components to render D3 data, but found that they were all deprecated by D3’s updates to version 4 and beyond. Instead, I found a handy library named React-Faux-Dom, which provides a lightweight implementation of jsdom that can serve as a base for D3 construction. Using the React-Faux-Dom, a developer can create a faux DOM element, use that element to engage in the normal DOM manipulation involved with the creation of a D3 visualization, and then return the faux element invoking the toReact method to ensure compatibility with the virtual DOM.</p><p>Here is a code snippet from my project:</p><pre>import ReactFauxDom from &#39;react-faux-dom&#39;;<br>import React, { Component, PropTypes } from &#39;react&#39;;<br>import { transformVizNode } from &#39;../d3helpers&#39;;</pre><pre>class D3Viz extends Component {<br>  constructor(props) {<br>    super(props);<br>  }</pre><pre>render() {<br>    const { data, chartType, searchTerm } = this.props;<br>    const fauxNode = ReactFauxDom.createElement(&#39;div&#39;);<br>    transformVizNode(fauxNode, data, chartType, searchTerm);<br>    return fauxNode.toReact();<br>  }<br>}</pre><pre>D3Viz.propTypes = {<br>  data: React.PropTypes.object.isRequired,<br>  chartType: React.PropTypes.string.isRequired,<br>  searchTerm: React.PropTypes.object<br>};</pre><pre>export default D3Viz;</pre><p>I am importing the transformVizNode function, which is passed four arguments — the fauxNode I created, the data structure I wish to render, the desired chartType for configuration purposes, and a searchTerm that I use for node illumination. This function does the complex DOM manipulation associated with the desired tree visualization, but using React-Faux-Dom itself is a simple process. Give React-Faux-Dom a try next time you are working on a React project that incorporates D3 in order to ensure reliable rendering without altering your normal D3 code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c1b29c26c9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Refined: Stateless Functional Components]]></title>
            <link>https://medium.com/@mlampesd/react-refined-stateless-functional-components-1a7ee2eed42?source=rss-e8197d0fc3dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a7ee2eed42</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Michael Lampe]]></dc:creator>
            <pubDate>Fri, 04 Nov 2016 00:32:54 GMT</pubDate>
            <atom:updated>2016-11-30T21:33:22.300Z</atom:updated>
            <content:encoded><![CDATA[<p>Released by Facebook in March 2013, React is a Javascript framework utilizing an object-oriented approach to provide a client-side data model that handles dynamic unidirectional data flow. Today, React is a major framework used by developers to build highly responsive single page applications. The changing data underlying the user interface of applications built with React is housed in an object named state within an instance of the Component class.</p><pre>const React = require(&#39;react&#39;);<br>const Paragraph = require(&#39;./Paragraph&#39;);</pre><pre>class Container extends React.Component {<br>  constructor(props) {<br>    super(props);<br>    this.state = {<br>      username: &#39;Michael&#39;<br>    }<br>  }</pre><pre>render() {<br>        return (&lt;div&gt;&lt;Paragraph username = { this.state.username } /&gt; &lt;/div&gt;);<br>};</pre><p>The above example showcases a simple instance of the Component class in React. After installing React with npm, I require the framework at the top of the page. I am also requiring Paragraph, a jsx file consisting of the stateless functional component that I will be rendering. I then instantiate a new class, Container, which extends the Component class and inherits its properties and methods through the constructor and super invocations. Next, I create a state object and assign it a single key-value pair, username: ‘Michael’. In Paragraph,jsx, I render a Paragraph tag, and pass it the username from state as a prop.</p><pre>const React = require(&#39;react&#39;);</pre><pre>function Paragraph ({ username }) {<br>   return (&lt;p&gt;{ username }&lt;/p&gt;);<br>}</pre><pre>Paragraph.propTypes = {<br>  username: React.PropTypes.string.isRequired<br>}</pre><pre>module.exports = Paragraph;</pre><p>Paragraph is a functional stateless component. In React, components that do not require a render method, life cycle methods, or their own state can be declared as functions. Here, I declare the function Paragraph, which takes in props as a parameter. I destructure my props and place username inside of the Paragraph function’s parameter. I now have access to username and choose to render it as text inside of the paragraph tag in my return statement. I specify my propTypes as key-pair values inside of an object, indicating that username is a required prop with the primitive type string.</p><h3><strong>Benefits of Stateless Functional Components</strong></h3><p>Stateless functional components are lightweight and modular, but can use any props that are passed. Lacking the weight of state, functional stateless components can be easily reused throughout React code base without worrying about the confusion that using multiple stateful components in a code base arbitrarily can evoke. Additionally, declaring components as a function indicates to fellow developers who are reviewing your code that this component is merely meant to render a DOM element, rather than to hold complex logic.</p><p>Creating a propTypes object below a stateless functional component is a practice that I find useful. When passing numerous props, listing the data types of various props and optionally requiring their existence can assist greatly in debugging. In the event that a prop is not passed, or a prop with the wrong data type is passed, an error will be thrown. These errors help the developer to debug the challenges associated with managing state and passing numerous props down through multiple components. In my humble opinion, stateless functional components exemplify the elegance of brevity while providing an imperative functionality to a remarkable framework.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a7ee2eed42" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>