<?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" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ Behavioral Programming - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ Behavioral Programming - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Fri, 22 May 2026 17:40:45 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/behavioral-programming/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ An intro to Behavioral Programming with React: request, wait, and block ]]>
                </title>
                <description>
                    <![CDATA[ By Luca Matteis Behavioral Programming (BP) is a paradigm coined in the 2012 article by David Harel, Assaf Marron, and Gera Weiss. Directly from the abstract: Behavioral programming simplifies the task of dealing with underspecification and conflict... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/an-intro-to-behavioral-programming-with-react-request-wait-and-block-ad876e2d235e/</link>
                <guid isPermaLink="false">66c343f542d4db64acf4cbca</guid>
                
                    <category>
                        <![CDATA[ Behavioral Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ React ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 23 Apr 2018 21:18:26 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*vFUyNVhV5JOKn76HfMJYXw.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Luca Matteis</p>
<p>Behavioral Programming (BP) is a paradigm coined in the <a target="_blank" href="http://www.wisdom.weizmann.ac.il/~amarron/BP%20-%20CACM%20-%20Author%20version.pdf">2012 article</a> by David Harel, Assaf Marron, and Gera Weiss.</p>
<p>Directly from the abstract:</p>
<blockquote>
<p>Behavioral programming simplifies the task of dealing with underspecification and conflicting requirements by enabling the addition of software modules that can not only add to but also <strong>modify existing behaviors</strong>.</p>
</blockquote>
<h3 id="heading-high-level-concepts">High-level concepts</h3>
<p>I’ll first explain the high-level concepts using an example of two React components <code>MoviesList</code> and <code>MoviesCount</code>. One displays a list of movies, the other a number of how many movies there are. Then I will dive into how exactly behavioral programming works.</p>
<p>Both components fetch data from the same HTTP URL. They were developed by two different teams in a large organization. When we render both components on a page, we have a problem as they perform the same request:</p>
<pre><code>&lt;&gt;  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">MoviesList</span> /&gt;</span></span>  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">MoviesCount</span> /&gt;</span></span>&lt;/&gt;
</code></pre><p>Little did we know that these are <strong>behavioral components</strong>. This means that we can do something quite clever to avoid both requests firing:</p>
<pre><code><span class="hljs-keyword">const</span> MoviesCountFromList = withBehavior([  <span class="hljs-function"><span class="hljs-keyword">function</span>* (<span class="hljs-params"></span>) </span>{    <span class="hljs-comment">// block FETCH_COUNT from happening    yield { block: ['FETCH_COUNT'] }  },  function* () {    // wait for FETCH_LIST, requested by the other    // MoviesList component, and derive the count    const response = yield { wait: ['FETCH_LIST'] }    this.setState({      count: response.length    })  }])(MoviesCount)</span>
</code></pre><p>In the above example, we stepped inside the <code>MoviesCount</code> component. We <strong>waited</strong> and <strong>requested</strong> for something to happen. And, more uniquely to behavioral programming, we also <strong>blocked</strong> something from happening.</p>
<p>Because we were trying to avoid both requests from firing, we blocked the <code>FETCH_COUNT</code> event from being triggered (since the same data was already acquired by the <code>FETCH_LIST</code> event).</p>
<pre><code>&lt;&gt;  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">MoviesList</span> /&gt;</span></span>  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">MoviesCountFromList</span> /&gt;</span></span>&lt;/&gt;
</code></pre><p>Adding functionality to existing components without modifying their code is the novelty of the behavioral programming paradigm.</p>
<p>Intuitively, this can allow the creation of more reusable components.</p>
<p>In the rest of the article, I’ll go more in depth into how behavioral programing (BP) works, specifically in the context of <strong>React</strong>.</p>
<h3 id="heading-rethinking-programming-flow">Rethinking programming flow</h3>
<p>To achieve the above functionality, we need to think about programming behaviors a bit differently. Specifically, <strong>events</strong> play a crucial role in orchestrating the synchronization between the various behaviors we define for our components.</p>
<pre><code><span class="hljs-keyword">const</span> addHotThreeTimes = behavior(  <span class="hljs-function"><span class="hljs-keyword">function</span>* (<span class="hljs-params"></span>) </span>{    <span class="hljs-keyword">yield</span> { <span class="hljs-attr">request</span>: [<span class="hljs-string">'ADD_HOT'</span>] }    <span class="hljs-keyword">yield</span> { <span class="hljs-attr">request</span>: [<span class="hljs-string">'ADD_HOT'</span>] }    <span class="hljs-keyword">yield</span> { <span class="hljs-attr">request</span>: [<span class="hljs-string">'ADD_HOT'</span>] }  })
</code></pre><pre><code><span class="hljs-keyword">const</span> addColdThreeTimes = behavior(  <span class="hljs-function"><span class="hljs-keyword">function</span>* (<span class="hljs-params"></span>) </span>{    <span class="hljs-keyword">yield</span> { <span class="hljs-attr">request</span>: [<span class="hljs-string">'ADD_COLD'</span>] }    <span class="hljs-keyword">yield</span> { <span class="hljs-attr">request</span>: [<span class="hljs-string">'ADD_COLD'</span>] }    <span class="hljs-keyword">yield</span> { <span class="hljs-attr">request</span>: [<span class="hljs-string">'ADD_COLD'</span>] }  })
</code></pre><pre><code>run(  addHotThreeTimes,  addColdThreeTimes)
</code></pre><p>When we run the above code, we get back a list of requested events:</p>
<pre><code>ADD_HOTADD_HOTADD_HOTADD_COLDADD_COLDADD_COLD
</code></pre><p>As expected, the first behavior executes. Once it’s done, the second behavior continues. However, new specifications for our component require us to change the order in which both events are triggered. Rather than triggering <code>ADD_HOT</code> three times, and then <code>ADD_COLD</code> three times, we want them to interleave and trigger <code>ADD_COLD</code> right after a <code>ADD_HOT</code> . This will keep the temperature somewhat stable.</p>
<pre><code>...
</code></pre><pre><code><span class="hljs-keyword">const</span> interleave = behavior(  <span class="hljs-function"><span class="hljs-keyword">function</span>* (<span class="hljs-params"></span>) </span>{    <span class="hljs-keyword">while</span> (<span class="hljs-literal">true</span>) {      <span class="hljs-comment">// wait for ADD_HOT while blocking ADD_COLD      yield { wait: ['ADD_HOT'], block: ['ADD_COLD'] }</span>
</code></pre><pre><code>      <span class="hljs-comment">// wait for ADD_COLD while blocking ADD_HOT      yield { wait: ['ADD_COLD'], block: ['ADD_HOT'] }    }  })</span>
</code></pre><pre><code>run(  addHotThreeTimes,  addColdThreeTimes,  interleave)
</code></pre><p>In the above example, we introduce a new interleave behavior which does exactly what we need.</p>
<pre><code>ADD_HOTADD_COLDADD_HOTADD_COLDADD_HOTADD_COLD
</code></pre><p>We changed the <strong>order</strong> of when things get executed, without having to modify the code of already-written behaviors.</p>
<p>The process is summarized in the graphic below.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/elehAKVL-hHtde0-NJJ4qaxh5-tUIhFvZfmP" alt="Image" width="800" height="264" loading="lazy"></p>
<p>The key concepts of this way of programming are the <strong>request</strong>, <strong>wait,</strong> and <strong>block</strong> operators. The semantics for these operators are:</p>
<ul>
<li><strong>Requesting</strong> an event: proposing that the event be considered for triggering, and asking to be notified when it is triggered</li>
<li><strong>Waiting for</strong> an event: without proposing its triggering, asking to be notified when the event is triggered</li>
<li><strong>Blocking</strong> an event: forbidding the triggering of the event, vetoing requests of other b-threads.</li>
</ul>
<p>Each b-thread (behavioral thread) lives on its own and is unaware of other threads. But they’re all interwoven at runtime, which allows them to interact with each-other in a very novel way.</p>
<p><strong>The generator syntax is essential to the functioning of a behavioral program. We need to control when to proceed to the next yield statement.</strong></p>
<h3 id="heading-back-to-react">Back to React</h3>
<p>How can these BP concepts be used in the context of React?</p>
<p>Turns out that through high-order components (HOCs), you can add this behavioral idiom to existing components in a very intuitive fashion:</p>
<pre><code><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">CommentsCount</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span> </span>{  render() {    <span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>{this.state.commentsCount}<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>  }}
</code></pre><pre><code><span class="hljs-keyword">const</span> FetchCommentsCount = withBehavior([  <span class="hljs-function"><span class="hljs-keyword">function</span>* (<span class="hljs-params"></span>) </span>{    <span class="hljs-keyword">yield</span> { <span class="hljs-attr">request</span>: [<span class="hljs-string">'FETCH_COMMENTS_COUNT'</span>]}    <span class="hljs-keyword">const</span> comments = <span class="hljs-keyword">yield</span> fetchComments()    <span class="hljs-keyword">yield</span> { <span class="hljs-attr">request</span>: [<span class="hljs-string">'FETCH_COMMENTS_COUNT_SUCCESS'</span>]}    <span class="hljs-built_in">this</span>.setState({ <span class="hljs-attr">commentsCount</span>: comments.length })  },])(CommentsCount)
</code></pre><p>Here we are using <code>withBehavior</code>, from the <a target="_blank" href="https://github.com/lmatteis/b-thread">b-thread</a> library, to make <code>CommentsCount</code> a behavioral component. Specifically, we are making it fetch the comments and display the data once the data is ready.</p>
<p>For simple components, this might not be such a game-changer. But let’s imagine more complex components, with lots of logic and other components inside of them.</p>
<p>We might imagine the entire Netflix website as a <code>&lt;Netflix</code> /&gt; component:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/uPWqKfgGgH0PCYqKsvEyybAcWY5rHQwgG1Ax" alt="Image" width="800" height="450" loading="lazy">
<em>Screenshot of Netflix’s website</em></p>
<p>When we use this component in our app, we’d like to interact with it. Specifically, when a movie is clicked, we don’t want to start the movie immediately, but instead we want to make an HTTP request, show other data about the movie, and then start the movie.</p>
<p>Without changing code inside the <code>&lt;Netflix</code> /&gt; component, I’d argue that this would be impossible to achieve without it being a behavioral component.</p>
<p>Instead let’s imagine that <code>&lt;Netflix</code> /&gt; was developed using behavioral programming:</p>
<pre><code><span class="hljs-keyword">const</span> NetflixWithMovieInfo = withBehavior([  <span class="hljs-function"><span class="hljs-keyword">function</span>* (<span class="hljs-params"></span>) </span>{    <span class="hljs-comment">// First, block the MOVIE_START from happening     // within &lt;Netflix /&gt; until a new     // FETCH_MOVIE_INFO_SUCCESS event has been requested.    // The yield statement below can be read as:    // wait for FETCH_MOVIE_INFO_SUCCESS while blocking MOVIE_START    yield {       wait: ['FETCH_MOVIE_INFO_SUCCESS'],       block: ['MOVIE_START']     }  },  function* () {    // Here we wait for MOVIE_CLICKED, which is    // triggered within &lt;Netflix /&gt;, and we fetch our    // movie info. Once that's done we request a new event    // which the earlier behavior is waiting upon    const movie = yield { wait: ['MOVIE_CLICKED'] }    const movieInfo = yield fetchMovieInfo(movie)    yield {       request: ['FETCH_MOVIE_INFO_SUCCESS'],       payload: movieInfo     }  }])(Netflix)</span>
</code></pre><p>Above we’ve created a new <code>NetflixWithMovieInfo</code> component which modifies the behavior of the <code>&lt;Netflix</code> /&gt; component (again, without changing its source code). The addition of the above behaviors makes it so <code>that MOVIE_C</code>LICKED will not tr<code>igger MOVIE</code>_START immediately.</p>
<p>Instead, it uses a combination of “waiting while blocking”: a <strong>wait</strong> and a <strong>block</strong> can be defined within a single yield statement.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/KFzI-ryqH4Y8RJSMj9sQbhlgOewuCahAjVPJ" alt="Image" width="800" height="387" loading="lazy"></p>
<p>The picture above describes, more in detail, what is happening within our behavioral components. Each little box within the components is a yield statement. Each vertical dashed arrow represents a behavior (aka b-thread).</p>
<p>Internally, the behavioral implementation will start by looking at all the yield statements of all b-threads at the current synchronization point, depicted using an horizontal yellow line. It will only continue to the next yield statement within a b-thread if no events in other b-threads are blocking it.</p>
<p>Since nothing is blocking <code>MOVIE_CLICKED</code> , it will be requested. We can then continue to the next yield statement for the Netflix behavior. At the next synch point, the b-thread on the far right, which is waiting for <code>MOVIE_CLICKED</code>, will proceed to its next yield statement.</p>
<p>The middle behavior that is waiting-and-blocking does not proceed. <code>FETCH_MOVIE_INFO_SUCCESS</code> was not requested by other b-threads, so it still waits-and-blocks. The next synchronization point will look something like this:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/q1eZUSHheMd3CdPZLyaaMx2EwdScwta7qHeW" alt="Image" width="800" height="280" loading="lazy"></p>
<p>As before, we will look at all the yield statement at this synchronization point. This time, however, we cannot request <code>MOVIE_START</code> because there’s another b-thread that is blocking it (the black yield statement). The Netflix component will therefore not start the movie.</p>
<p><code>FETCH_MOVIE_INFO_SUCCESS</code> on the far right, however, is free to be requested. This will unblock <code>MOVIE_START</code> at the next synch point.</p>
<p>All this in practice allowed us to change the order of things happening within other components, without directly modifying their code. We were able to block certain events from firing until other conditions were met in other components.</p>
<p><strong>This changes the way we might think of programming:</strong> not necessarily a set of statements executed in order, but <strong>rather an interleaving of yield statements all synchronized through specific event semantics.</strong></p>
<p>Here’s a simple animation depicting the way b-threads are executed and interwoven at runtime.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/vgOkR26vCmjVgmF6-gJpO5Cetiku9SsaqxFE" alt="Image" width="800" height="600" loading="lazy">
<em>Order of execution of different threads</em></p>
<h3 id="heading-programming-without-changing-old-code">Programming without changing old code</h3>
<p>There is another way we can understand this programming idiom. We can compare the way we currently program as specifications change, versus how it would be done with behavioral programming.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/uH6c2Q8UiiNHTtir3GipE69BK9ld6ZTY0NYe" alt="Image" width="800" height="330" loading="lazy">
<em>Each added behavior is depicted using a different colored rectangle</em></p>
<p>In the above caption, we imagine how behavior may be added to a non-behavioral program. We start with a program described only using three black rectangles (on the left).</p>
<p>As specifications change, we realize we need to modify the program and add new behavior in various sections of the program, depicted as newly added colored rectangles. We continue doing this as requirements for our software change.</p>
<p>Every addition of behavior requires us to change code that was written, which possibly litters the old behavior with bugs. Furthermore, if the program we are changing is part of various other modules used by different people, we might be introducing unwanted behavior to their software. Finally, it may not be possible to change specific programs as they might be distributed as libraries with licensed source code.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/rtjBXCCf8ftal6Utzyt0wX6EIOmvq9k1Qk0n" alt="Image" width="800" height="309" loading="lazy">
<em>Each column on the left is a b-thread</em></p>
<p>In the above figure, we see how the same program-modifications can be achieved using behavioral programming idioms. We still start with our three rectangles on the left as we did before. But as new specifications arise, we don’t modify them. Instead we add new b-threads, represented as columns.</p>
<p>The resulting program is the same, although constructed in a very different way. One of the advantages of the behavioral approach is that we don’t have to modify old code as requirements change.</p>
<p>You can also imagine developing each b-thread in parallel, possibly by different people in a large organization, since they do not directly depend on each other.</p>
<p>The benefit of this approach also seems to be with packaging: we can change the behavior of a library without needing to access or modify its source-code.</p>
<h3 id="heading-apis-not-only-as-props-but-as-events">APIs not only as props, but as events</h3>
<p>Currently, the only way for a React component to communicate with the outside world is via props (apart from the Context API).</p>
<p>By making a component behavioral, instead of using props, we tell the outside world about when things happen within the component by yielding events.</p>
<p>To allow other developers to interact with the behavior of a component, we must therefore document the events that it <strong>requests</strong>, the events it <strong>waits for,</strong> and finally the events it <strong>blocks</strong>.</p>
<p><strong>Events become the new API.</strong></p>
<p>For instance, in a non-behavioral <code>Counter</code> component, we tell the outside world when the counter is incremented and what the current count is, using an <code>onIncrement</code> prop:</p>
<pre><code><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Counter</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span> </span>{  state = { <span class="hljs-attr">currentCount</span>: <span class="hljs-number">0</span> }  handleClick = <span class="hljs-function">() =&gt;</span> {    <span class="hljs-built_in">this</span>.setState(<span class="hljs-function"><span class="hljs-params">prevState</span> =&gt;</span> ({      <span class="hljs-attr">currentCount</span>: prevState.currentCount + <span class="hljs-number">1</span>    }), <span class="hljs-function">() =&gt;</span> {      <span class="hljs-built_in">this</span>.props.onIncrement(<span class="hljs-built_in">this</span>.state.currentCount)    })  }  render() {    {<span class="hljs-built_in">this</span>.state.currentCount}    &lt;button onClick={<span class="hljs-built_in">this</span>.handleClick}&gt;+&lt;/button&gt;  }}
</code></pre><pre><code>&lt;Counter   onIncrement={<span class="hljs-function">(<span class="hljs-params">currentCount</span>) =&gt;</span>     <span class="hljs-built_in">console</span>.log(currentCount)  }/&gt;
</code></pre><p>What if we want to do something else before the counter’s state gets incremented? Indeed we could add a new prop such as <code>onBeforeIncrement</code>, but the point is that we don’t want to add props and refactor code every time a new specific arises.</p>
<p>If we transform it into a behavioral component we can avoid refactoring when new specifications emerge:</p>
<pre><code><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Counter</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span> </span>{  state = { <span class="hljs-attr">currentCount</span>: <span class="hljs-number">0</span> }  handleClick = <span class="hljs-function">() =&gt;</span> {    bp.event(<span class="hljs-string">'CLICKED_INCREMENT'</span>)  }  render() {    {<span class="hljs-built_in">this</span>.state.currentCount}    &lt;button onClick={<span class="hljs-built_in">this</span>.handleClick}&gt;+&lt;/button&gt;  }}
</code></pre><pre><code><span class="hljs-keyword">const</span> BehavioralCounter = withBehavior([  <span class="hljs-function"><span class="hljs-keyword">function</span>* (<span class="hljs-params"></span>) </span>{    <span class="hljs-keyword">yield</span> { <span class="hljs-attr">wait</span>: [<span class="hljs-string">'CLICKED_INCREMENT'</span>] }    <span class="hljs-keyword">yield</span> { <span class="hljs-attr">request</span>: [<span class="hljs-string">'UPDATE_CURRENT_COUNT'</span>] }
</code></pre><pre><code>    <span class="hljs-built_in">this</span>.setState(<span class="hljs-function"><span class="hljs-params">prevState</span> =&gt;</span> ({      <span class="hljs-attr">currentCount</span>: prevState.currentCount + <span class="hljs-number">1</span>    }), <span class="hljs-function">() =&gt;</span> {      <span class="hljs-built_in">this</span>.props.onIncrement(<span class="hljs-built_in">this</span>.state.currentCount)    })  }])(Counter)
</code></pre><p>Notice how we moved the logic for when the state is updated inside a b-thread. Furthermore, before the update actually takes place, a new event <code>UPDATE_CURRENT_COUNT</code> is requested.</p>
<p>This effectively allows other b-threads to block the update from happening.</p>
<p>Components can also be encapsulated and shared as different packages, and users can add behavior as they see fit.</p>
<pre><code><span class="hljs-comment">// package-name: movies-listexport const function MoviesList() {  ...}</span>
</code></pre><pre><code><span class="hljs-comment">// package-name: movies-list-with-paginationexport const MoviesListWithPagination = pipe(  withBehavior(addPagination))(MoviesList)</span>
</code></pre><pre><code><span class="hljs-comment">// package-name: movies-list-with-pagination-logicexport const MoviesListWithDifferentPaginationLogic = pipe(  withBehavior(changePaginationLogic))(MoviesListWithPagination)</span>
</code></pre><p>Again this is different from simply enhancing a component, as a regular HOC would do. We can block certain things from happening in the components we extend from, effectively modifying their behavior.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>This new programming idiom might feel uncomfortable at first, but it seems to alleviate a prominent issue we have when using UI components: <strong>it is hard to reuse components, because they don’t blend with the environment they were put into.</strong></p>
<p>In the future, perhaps using these behavioral concepts, we will be able to add new behavior to apps by simply mounting new components. Stuff like this will be possible:</p>
<pre><code>&lt;Environment&gt;  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Netflix</span> /&gt;</span></span>  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Twitter</span> /&gt;</span></span>  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">WaitForTwitterBeforeNetflix</span> /&gt;</span></span>  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">OnTwitterClickShowLoader</span> /&gt;</span></span>&lt;/Environment&gt;
</code></pre><p>Additionally, events don’t need to pollute the whole app and can be broadcast only within a specific environment.</p>
<p>Thanks for reading! If you’re interested in an actual implementation of behavioral programming, please see my current work in progress library that works with React: <a target="_blank" href="https://github.com/lmatteis/b-thread">https://github.com/lmatteis/b-thread</a>. The <a target="_blank" href="http://www.wisdom.weizmann.ac.il/~bprogram/">Behavioral Programming homepage</a> also contains various implementations.</p>
<p>For more information on this exciting new concept, I suggest you read the <a target="_blank" href="https://scholar.google.ca/scholar?hl=en&amp;as_sdt=0%2C5&amp;q=behavioral+programming+harel&amp;btnG=">scientific papers on Behavioral Programming</a> or check some of <a target="_blank" href="https://medium.com/@lmatteis/on-user-interface-development-appending-to-the-event-log-8d8ca966795d">my other articles</a> <a target="_blank" href="https://medium.com/@lmatteis/statecharts-updating-ui-state-767052b6b129">on the subject</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
