<?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 adetutu john on Medium]]></title>
        <description><![CDATA[Stories by adetutu john on Medium]]></description>
        <link>https://medium.com/@johnadetutu90?source=rss-de0dad1e8cd3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*j111UuwJsi8aY-EpgB4pXw.jpeg</url>
            <title>Stories by adetutu john on Medium</title>
            <link>https://medium.com/@johnadetutu90?source=rss-de0dad1e8cd3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 09:31:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@johnadetutu90/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-spring just got Hooked ⚓]]></title>
            <link>https://medium.com/@johnadetutu90/react-spring-just-got-hooked-32bd672e3bb7?source=rss-de0dad1e8cd3------2</link>
            <guid isPermaLink="false">https://medium.com/p/32bd672e3bb7</guid>
            <category><![CDATA[animation]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[hooks]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react-spring]]></category>
            <dc:creator><![CDATA[adetutu john]]></dc:creator>
            <pubDate>Tue, 11 Dec 2018 17:45:56 GMT</pubDate>
            <atom:updated>2018-12-11T17:45:56.224Z</atom:updated>
            <content:encoded><![CDATA[<p><em>By John Adetutu and Paul Henschel</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*OoG30hS5erH6dJuBCXxU6A.gif" /></figure><h3>A first look at react-springs 7’s new hooks API.</h3><p>I am assuming most readers by now must have heard of the new hooks api unveiled recently by the React team, if not then I suggest reading up on it <a href="https://reactjs.org/docs/hooks-intro.html">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YpTMFG4xa2ImDkGJYAls1A.png" /><figcaption>Intent is scattered</figcaption></figure><p>In the past, in order to deal with complex interaction meant jumping through a hoops, mangling code through a series of disconnected lifecycles and render-props. The linear and functional flow often got lost and the intent was scattered. This was especially worrying when dealing with animations and although react-spring did what it could to animation expressive as possible, the natural intent had to be scattered due to the component structure. Here is a simple typical example: <a href="https://codesandbox.io/s/5zwwpzxxpn">https://codesandbox.io/embed/5zwwpzxxpn</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m-7eha396VhrKLHOKpGdMQ.png" /><figcaption>Intent is linear</figcaption></figure><p>Hooks on the other hand allow us to express linear intent. In the linked example for instance we have input coordinates that are bound to the mouse. These coordinates are used to form a trail. The trail is finally rendered out. Our intent forms a natural chain: items &gt; coordinates &gt; trail &gt; animated view. Here is the same example using hooks: <a href="https://codesandbox.io/s/z3j207w3l">https://codesandbox.io/embed/z3j207w3l</a></p><h3>Introducing react-spring 7</h3><p>React-spring was <a href="https://medium.com/@drcmda/hooks-in-react-spring-a-tutorial-c6c436ad7ee4">one of the first libraries</a> to explore hooks, today we are thrilled to announce that all primitives are now available as hooks, not just useSpring. That means you can now form transitions, trails and keyframes without render props and inversion of control.</p><p>You can find a full overview here: <a href="http://react-spring.surge.sh/hooks">http://react-spring.surge.sh/hooks</a></p><p>Here are a couple of demos:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodesandbox.io%2Fembed%2F8zx4ppk01l&amp;url=https%3A%2F%2Fcodesandbox.io%2Fs%2F8zx4ppk01l&amp;image=https%3A%2F%2Fcodesandbox.io%2Fapi%2Fv1%2Fsandboxes%2F8zx4ppk01l%2Fscreenshot.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codesandbox" width="1000" height="500" frameborder="0" scrolling="no"><a href="https://medium.com/media/7836de0867d62707a994c7e8309922f5/href">https://medium.com/media/7836de0867d62707a994c7e8309922f5/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K0tU2usKIU-8exWa51PQwg.png" /><figcaption>The relevant code for the morphing blob demo</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodesandbox.io%2Fembed%2Fzrj66y8714&amp;url=https%3A%2F%2Fcodesandbox.io%2Fs%2Fzrj66y8714&amp;image=https%3A%2F%2Fcodesandbox.io%2Fapi%2Fv1%2Fsandboxes%2Fzrj66y8714%2Fscreenshot.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codesandbox" width="1000" height="500" frameborder="0" scrolling="no"><a href="https://medium.com/media/a85cf4b1f5ad23a7d2279f0bb74ed641/href">https://medium.com/media/a85cf4b1f5ad23a7d2279f0bb74ed641/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-VaQ1Kfn6JEKCa_yGuTrxw.png" /><figcaption>The relevant code for the slider demo</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodesandbox.io%2Fembed%2Fzn2q57vn13&amp;url=https%3A%2F%2Fcodesandbox.io%2Fs%2Fzn2q57vn13&amp;image=https%3A%2F%2Fcodesandbox.io%2Fapi%2Fv1%2Fsandboxes%2Fzn2q57vn13%2Fscreenshot.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codesandbox" width="1000" height="500" frameborder="0" scrolling="no"><a href="https://medium.com/media/a85a5f06fae7048e0f433b1df3d0aeef/href">https://medium.com/media/a85a5f06fae7048e0f433b1df3d0aeef/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K7TK8EZNrvBSydhG2aMe5w.png" /><figcaption>The relevant code for the trailing text demo</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodesandbox.io%2Fembed%2Frj998k4vmm&amp;url=https%3A%2F%2Fcodesandbox.io%2Fs%2Frj998k4vmm&amp;image=https%3A%2F%2Fcodesandbox.io%2Fapi%2Fv1%2Fsandboxes%2Frj998k4vmm%2Fscreenshot.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codesandbox" width="1000" height="500" frameborder="0" scrolling="no"><a href="https://medium.com/media/3597d8618c6f4142631e15610ea37481/href">https://medium.com/media/3597d8618c6f4142631e15610ea37481/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AcJsrSAFRIWqSXbE2HS7SA.png" /><figcaption>The relevant code for the 3d-card demo</figcaption></figure><p>The new api will be released in under a new major today (7).<strong> There are (almost) no breaking changes</strong>. We offer a new export for hooks (react-spring/hooks) which includes all primitives (useSpring, useTrail, useTransition, useKeyframe) and there has been a minor change regarding exports in general as we removed react-spring/dist/.... You can access addons, konva, universal and native directly now. See: <a href="http://react-spring.surge.sh/new">http://react-spring.surge.sh/new</a></p><p>My name is John Adetutu, i am based in London, United Kingdom. Currently working at <a href="https://f1000.com/">F1000</a>. I built the new hooks api with <a href="https://twitter.com/0xca0a">Paul Henschel</a>.</p><p>follow us on Twitter: <a href="https://twitter.com/johnadetutu93">John</a>, <a href="https://twitter.com/0xca0a">Paul</a></p><p>And on Github: <a href="https://github.com/ruggedy">John</a>, <a href="https://github.com/drcmda">Paul</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32bd672e3bb7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>