<?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 Jason Maddox-Lee on Medium]]></title>
        <description><![CDATA[Stories by Jason Maddox-Lee on Medium]]></description>
        <link>https://medium.com/@jmaddoxlee17?source=rss-9fc97e88ed6b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*QhSS7dw6pdd1LNk6</url>
            <title>Stories by Jason Maddox-Lee on Medium</title>
            <link>https://medium.com/@jmaddoxlee17?source=rss-9fc97e88ed6b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 09:33:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jmaddoxlee17/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[Intro to OctohKey AI Growth]]></title>
            <link>https://medium.com/@jmaddoxlee17/intro-to-octohkey-ai-growth-67ba424b0d1b?source=rss-9fc97e88ed6b------2</link>
            <guid isPermaLink="false">https://medium.com/p/67ba424b0d1b</guid>
            <dc:creator><![CDATA[Jason Maddox-Lee]]></dc:creator>
            <pubDate>Thu, 11 Jun 2026 19:55:58 GMT</pubDate>
            <atom:updated>2026-06-11T19:55:58.276Z</atom:updated>
            <content:encoded><![CDATA[<p>As a business owner, one of the most time-consuming parts of growth is not just sending messages.</p><p>It is the entire process around it.</p><p>You have to search for target clients online, collect company and contact information, analyze whether they are a good fit, write customized emails or LinkedIn messages, track responses, and follow up consistently.</p><p>That manual process takes a lot of time, and it is easy to lose track of good opportunities.</p><p>That is why I am building the internal <strong>OctohKey AI Growth Agent</strong>.</p><p>The goal is to support OctohKey’s growth workflow by helping find potential prospects, analyze their fit, generate personalized outreach, track engagement, and manage follow-ups.</p><h3>Main Modules</h3><h3>1. Prospect Finder</h3><p>Finds companies and decision-makers from public sources.</p><h3>2. Company Analyzer</h3><p>Analyzes whether a company is related to multifamily, property management, vendor-heavy operations, turn services, regional management, or similar areas.</p><h3>3. Contact Resolver</h3><p>Finds publicly available contact information or LinkedIn profile URLs.</p><h3>4. Fit Scorer</h3><p>Scores how likely the prospect is to need OctohKey.</p><h3>5. Message Generator</h3><p>Creates personalized email or LinkedIn message drafts based on the prospect’s company, role, and possible pain points.</p><h3>6. Human Approval Queue</h3><p>Allows me to review, edit, and approve messages before they are sent.</p><h3>7. Outreach Sender</h3><p>Sends approved emails or prepares LinkedIn messages for manual sending.</p><h3>8. Reply Tracker</h3><p>Tracks who replied, who engaged, and who needs a follow-up.</p><h3>Why I’m Building This</h3><p>This is not meant to replace human judgment.</p><p>The goal is to remove repetitive manual work so I can spend more time on the conversations that actually matter.</p><p>Instead of manually researching every prospect from scratch, OctohKey AI Growth will help me organize the process, surface better-fit leads, and keep outreach consistent.</p><p>For me, this is not just an AI experiment.</p><p>It is a practical internal tool to help grow OctohKey more efficiently.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67ba424b0d1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is State in React?]]></title>
            <link>https://medium.com/@jmaddoxlee17/understanding-react-usestate-how-state-updates-actually-work-4c271a9b00a9?source=rss-9fc97e88ed6b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c271a9b00a9</guid>
            <dc:creator><![CDATA[Jason Maddox-Lee]]></dc:creator>
            <pubDate>Fri, 05 Jun 2026 17:31:08 GMT</pubDate>
            <atom:updated>2026-06-05T18:03:47.718Z</atom:updated>
            <content:encoded><![CDATA[<p>In React, <strong>state</strong> is data that belongs to a component and can change over time.</p><p>State is commonly used for things like:</p><ul><li>whether a modal is open</li><li>text typed into a form</li><li>selected tabs</li><li>cart items</li><li>logged-in user information</li><li>loading and error states</li><li>data returned from an API</li></ul><p>For example:</p><pre>const [isOpen, setIsOpen] = useState(false);<br>const [name, setName] = useState(&quot;&quot;);<br>const [cartItems, setCartItems] = useState([]);</pre><p>The important idea is this:</p><blockquote><em>State is React’s way of remembering values between renders and knowing when the UI needs to update.</em></blockquote><h3>Why Not Use a Regular JavaScript Variable?</h3><p>At first, you might think you can just use a normal variable:</p><pre>function Counter() {<br>  let count = 0;<br><br>  function handleClick() {<br>    count++;<br>    console.log(count);<br>  }<br><br>  return (<br>    &lt;button onClick={handleClick}&gt;<br>      Count: {count}<br>    &lt;/button&gt;<br>  );<br>}</pre><p>This does not work the way we want.</p><p>There are two main reasons.</p><h3>1. React Does Not Know the Variable Changed</h3><p>When you write:</p><pre>count++;</pre><p>JavaScript changes the value in memory, but React is not automatically watching that variable.</p><p>React does not know that the UI should be updated.</p><p>A normal variable change does <strong>not</strong> tell React:</p><blockquote><em>“Hey, this component needs to be rendered again.”</em></blockquote><p>State setters, like setCount, are the official way to notify React that component data has changed.</p><h3>2. Components Are Functions</h3><p>A React function component is still just a JavaScript function.</p><p>Every time React renders a component, it runs that function again from top to bottom.</p><p>That means a regular local variable gets recreated on every render:</p><pre>function Counter() {<br>  let count = 0; // recreated every render<br>}</pre><p>So normal variables have two problems:</p><ol><li>They do not trigger a re-render.</li><li>They do not persist between renders.</li></ol><p>That is why React gives us useState.</p><h3>Basic useState Example</h3><p>Here is the correct version of the counter:</p><pre>import { useState } from &quot;react&quot;;<br><br>function Counter() {<br>  const [count, setCount] = useState(0);<br><br>  function handleClick() {<br>    setCount(count + 1);<br>  }<br><br>  return (<br>    &lt;button onClick={handleClick}&gt;<br>      Count: {count}<br>    &lt;/button&gt;<br>  );<br>}</pre><p>When the button is clicked:</p><ol><li>setCount(count + 1) tells React the state should change.</li><li>React schedules a re-render.</li><li>The component function runs again.</li><li>React displays the new value.</li></ol><h3>Why Does setState Cause a Re-Render?</h3><p>React uses a reactive model.</p><p>It does not constantly scan every variable in your application to see if something changed. Instead, React waits for a signal.</p><p>Calling a state setter is that signal.</p><pre>setCount(count + 1);</pre><p>This tells React:</p><blockquote><em>“This component has new state. Re-render it.”</em></blockquote><p>After that, React runs the component again and compares the new UI output with the previous one.</p><p>This process is called <strong>reconciliation</strong>.</p><h3>What Happens During Reconciliation?</h3><p>When state changes, React does roughly this:</p><ol><li>Calls the component function again.</li><li>Creates a new virtual representation of the UI.</li><li>Compares the new result with the previous one.</li><li>Finds what changed.</li><li>Updates only the necessary parts of the real DOM.</li></ol><p>This is important because updating the real browser DOM can be expensive. React tries to make UI updates efficient by only applying the changes that matter.</p><h3>State Updates Are Batched</h3><p>React is smart about performance.</p><p>If you call multiple state setters in the same event handler, React usually groups them together into one re-render.</p><p>For example:</p><pre>function handleClick() {<br>  setCount(count + 1);<br>  setIsLoggedIn(true);<br>  setTheme(&quot;dark&quot;);<br>}</pre><p>React does not need to re-render three separate times. It can batch these updates and re-render once.</p><p>Starting in React 18, automatic batching became broader and can also apply in places like promises, timeouts, and native event handlers.</p><h3>Why State Updates Feel Asynchronous</h3><p>One common mistake is expecting state to change immediately on the next line.</p><pre>const [count, setCount] = useState(0);<br><br>function handleClick() {<br>  setCount(count + 1);<br>  console.log(count); // still 0<br>}</pre><p>This surprises many developers.</p><p>The reason is that setCount does not directly change the count variable inside the currently running function.</p><p>Instead, it schedules React to render the component again with the new state.</p><p>The count variable inside the current render is a snapshot.</p><p>So during this render:</p><pre>count === 0</pre><p>On the next render:</p><pre>count === 1</pre><p>A good way to think about it:</p><blockquote><em>State values are snapshots from the render in which they were created.</em></blockquote><h3>The Functional Update Pattern</h3><p>Sometimes you need to update state based on the previous state.</p><p>For example, this looks like it should increase the count by 3:</p><pre>function handleClick() {<br>  setCount(count + 1);<br>  setCount(count + 1);<br>  setCount(count + 1);<br>}</pre><p>But if count is 0, the result may only be 1.</p><p>Why?</p><p>Because each line is using the same snapshot:</p><pre>setCount(0 + 1);<br>setCount(0 + 1);<br>setCount(0 + 1);</pre><p>The fix is to use a functional update:</p><pre>function handleClick() {<br>  setCount(prev =&gt; prev + 1);<br>  setCount(prev =&gt; prev + 1);<br>  setCount(prev =&gt; prev + 1);<br>}</pre><p>Now React applies each update in order:</p><pre>0 -&gt; 1<br>1 -&gt; 2<br>2 -&gt; 3</pre><p>The final result is 3.</p><h3>Direct Update vs Functional Update</h3><p>Direct update:</p><pre>setCount(count + 1);</pre><p>Functional update:</p><pre>setCount(prevCount =&gt; prevCount + 1);</pre><p>Use a functional update when the next state depends on the previous state.</p><p>This is especially useful when:</p><ul><li>updating the same state multiple times in one event</li><li>working with timers</li><li>working with event listeners</li><li>avoiding stale closures</li><li>optimizing callbacks</li></ul><h3>Functional Updates with Timers</h3><p>Here is a common timer example:</p><pre>useEffect(() =&gt; {<br>  const id = setInterval(() =&gt; {<br>    setCount(prev =&gt; prev + 1);<br>  }, 1000);<br><br>  return () =&gt; clearInterval(id);<br>}, []);</pre><p>This works because React passes the latest state value into the updater function.</p><p>If you wrote this instead:</p><pre>useEffect(() =&gt; {<br>  const id = setInterval(() =&gt; {<br>    setCount(count + 1);<br>  }, 1000);<br><br>  return () =&gt; clearInterval(id);<br>}, []);</pre><p>You could run into a stale state problem because the interval callback may capture the old count value from the first render.</p><h3>Functional Updates with useCallback</h3><p>Functional updates can also help avoid unnecessary dependencies.</p><p>For example:</p><pre>const toggleSidebar = useCallback(() =&gt; {<br>  setIsOpen(!isOpen);<br>}, [isOpen]);</pre><p>This works, but the function is recreated every time isOpen changes.</p><p>Instead, you can write:</p><pre>const toggleSidebar = useCallback(() =&gt; {<br>  setIsOpen(prev =&gt; !prev);<br>}, []);</pre><p>Now the function does not depend on isOpen, because React provides the latest value through the updater function.</p><h3>Common useState Mistakes</h3><h3>1. Expecting State to Update Immediately</h3><p>Incorrect:</p><pre>const [userData, setUserData] = useState(null);<br><br>function handleLogin(user) {<br>  setUserData(user);<br><br>  if (userData.isAdmin) {<br>    showAdminDashboard();<br>  }<br>}</pre><p>This is wrong because userData still contains the value from the current render.</p><p>Better:</p><pre>function handleLogin(user) {<br>  setUserData(user);<br><br>  if (user.isAdmin) {<br>    showAdminDashboard();<br>  }<br>}</pre><p>Use the data you already have when you need to make an immediate decision.</p><h3>2. Not Using Functional Updates When Needed</h3><p>Incorrect:</p><pre>const [quantity, setQuantity] = useState(1);<br><br>function addToCart() {<br>  setQuantity(quantity + 1);<br>  setQuantity(quantity + 1);<br>}</pre><p>If quantity is 1, the final result may be 2, not 3.</p><p>Correct:</p><pre>function addToCart() {<br>  setQuantity(prev =&gt; prev + 1);<br>  setQuantity(prev =&gt; prev + 1);<br>}</pre><p>Each update uses the latest queued state.</p><h3>3. Mutating State Directly</h3><p>State should be treated as immutable.</p><p>Incorrect:</p><pre>const [profile, setProfile] = useState({<br>  name: &quot;Alex&quot;,<br>  role: &quot;User&quot;<br>});<br><br>function makeAdmin() {<br>  profile.role = &quot;Admin&quot;;<br>  setProfile(profile);<br>}</pre><p>This mutates the same object reference.</p><p>React may not detect the change properly because the object reference is still the same.</p><p>Correct:</p><pre>function makeAdmin() {<br>  setProfile({<br>    ...profile,<br>    role: &quot;Admin&quot;<br>  });<br>}</pre><p>This creates a new object, which tells React that state changed.</p><h3>4. Storing Derived State</h3><p>Sometimes developers store values in state even though they can be calculated from existing state.</p><p>Incorrect:</p><pre>const [firstName, setFirstName] = useState(&quot;&quot;);<br>const [lastName, setLastName] = useState(&quot;&quot;);<br>const [fullName, setFullName] = useState(&quot;&quot;);</pre><p>fullName does not need its own state because it can be calculated.</p><p>Better:</p><pre>const [firstName, setFirstName] = useState(&quot;&quot;);<br>const [lastName, setLastName] = useState(&quot;&quot;);<br><br>const fullName = `${firstName} ${lastName}`;</pre><p>This avoids synchronization bugs.</p><p>A good rule:</p><blockquote><em>If a value can be calculated from existing state or props, it probably should not be separate state.</em></blockquote><h3>5. Running Expensive Initialization on Every Render</h3><p>Sometimes the initial state requires expensive work.</p><p>Incorrect:</p><pre>const [config, setConfig] = useState(readLargeFile());</pre><p>This calls readLargeFile() on every render, even though React only uses the initial value on the first render.</p><p>Better:</p><pre>const [config, setConfig] = useState(() =&gt; readLargeFile());</pre><p>This is called <strong>lazy initialization</strong>.</p><p>React only runs the function during the initial render.</p><h3>When Should You Use useState?</h3><p>Use useState when a component needs to remember data that can change and affect the UI.</p><p>Good examples:</p><pre>const [isOpen, setIsOpen] = useState(false);<br>const [searchTerm, setSearchTerm] = useState(&quot;&quot;);<br>const [selectedId, setSelectedId] = useState(null);<br>const [items, setItems] = useState([]);</pre><p>Avoid useState when:</p><ul><li>the value can be calculated from props or other state</li><li>the value does not affect rendering</li><li>the value should persist across the whole app instead of one component</li><li>the value is better handled by a form library, server cache, or global state manager</li></ul><h3>Interview-Ready Explanation</h3><p>If I had to explain useState in an interview, I would say:</p><blockquote><em>useState lets a React function component store values between renders. When we call the setter function, React schedules a re-render and updates the UI using the new state value. State updates are batched for performance, so state should be treated as a snapshot inside the current render. If the next state depends on the previous state, we should use the functional update pattern.</em></blockquote><h3>Final Takeaway</h3><p>useState is simple to start using, but understanding how it works makes a big difference in real React applications.</p><p>The key ideas are:</p><ul><li>normal variables do not persist between renders</li><li>normal variable changes do not trigger UI updates</li><li>setState tells React to re-render</li><li>state values are snapshots</li><li>React batches state updates</li><li>functional updates prevent stale state bugs</li><li>objects and arrays in state should be updated immutably</li><li>derived values usually should not be stored as separate state</li></ul><p>Once these ideas become clear, many confusing React bugs become much easier to understand.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c271a9b00a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>