text: <!DOCTYPE html>
  <html lang="en">
    <head>
      <title>Classes  Reference</title>
      <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
      <link rel="stylesheet" type="text/css" href="css/highlight.css" />
      <meta charset='utf-8'>
      <script src="js/jquery.min.js" defer></script>
      <script src="js/jazzy.js" defer></script>
      
    </head>
    <body>
      <a title="Classes  Reference"></a>
      <header>
        <div class="content-wrapper">
          <p><a href="index.html">Katana Docs</a> (99% documented)</p>
          <p class="header-right"><a href="https://github.com/BendingSpoons/katana-swift"><img src="img/gh.png"/>View on GitHub</a></p>
        </div>
      </header>
      <div class="content-wrapper">
        <p id="breadcrumbs">
          <a href="index.html">Katana Reference</a>
          <img id="carat" src="img/carat.png" />
          Classes  Reference
        </p>
      </div>
      <div class="content-wrapper">
        <nav class="sidebar">
          <ul class="nav-groups">
            <li class="nav-group-name">
              <a href="Classes.html">Classes</a>
              <ul class="nav-group-tasks">
                <li class="nav-group-task">
                  <a href="Classes/EmptySideEffectDependencyContainer.html">EmptySideEffectDependencyContainer</a>
                </li>
                <li class="nav-group-task">
                  <a href="Classes/Node.html">Node</a>
                </li>
                <li class="nav-group-task">
                  <a href="Classes/PlasticNode.html">PlasticNode</a>
                </li>
                <li class="nav-group-task">
                  <a href="Classes/PlasticView.html">PlasticView</a>
                </li>
                <li class="nav-group-task">
                  <a href="Classes/Renderer.html">Renderer</a>
                </li>
                <li class="nav-group-task">
                  <a href="Classes/StateMockProvider.html">StateMockProvider</a>
                </li>
                <li class="nav-group-task">
                  <a href="Classes/Store.html">Store</a>
                </li>
                <li class="nav-group-task">
                  <a href="Classes/ViewsContainer.html">ViewsContainer</a>
                </li>
              </ul>
            </li>
            <li class="nav-group-name">
              <a href="Enums.html">Enums</a>
              <ul class="nav-group-tasks">
                <li class="nav-group-task">
                  <a href="Enums/AnimationType.html">AnimationType</a>
                </li>
                <li class="nav-group-task">
                  <a href="Enums/AsyncActionState.html">AsyncActionState</a>
                </li>
                <li class="nav-group-task">
                  <a href="Enums.html#/s:O6Katana9EmptyKeys">EmptyKeys</a>
                </li>
              </ul>
            </li>
            <li class="nav-group-name">
              <a href="Extensions.html">Extensions</a>
              <ul class="nav-group-tasks">
                <li class="nav-group-task">
                  <a href="Extensions/Array.html">Array</a>
                </li>
                <li class="nav-group-task">
                  <a href="Extensions/CGSize.html">CGSize</a>
                </li>
                <li class="nav-group-task">
                  <a href="Extensions/UIView.html">UIView</a>
                </li>
              </ul>
            </li>
            <li class="nav-group-name">
              <a href="Protocols.html">Protocols</a>
              <ul class="nav-group-tasks">
                <li class="nav-group-task">
                  <a href="Protocols/Action.html">Action</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/ActionWithSideEffect.html">ActionWithSideEffect</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/AnyAsyncAction.html">AnyAsyncAction</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/AnyConnectedNodeDescription.html">AnyConnectedNodeDescription</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/AnyNode.html">AnyNode</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/AnyNodeDescription.html">AnyNodeDescription</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/AnyNodeDescriptionProps.html">AnyNodeDescriptionProps</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/AnyNodeDescriptionWithChildren.html">AnyNodeDescriptionWithChildren</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/AnyNodeDescriptionWithRefProps.html">AnyNodeDescriptionWithRefProps</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/AnyPlasticNodeDescription.html">AnyPlasticNodeDescription</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/AnyPlatformNativeViewWithRef.html">AnyPlatformNativeViewWithRef</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/AnyStore.html">AnyStore</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/AsyncAction.html">AsyncAction</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/Childrenable.html">Childrenable</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/ConnectedNodeDescription.html">ConnectedNodeDescription</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/LinkeableAction.html">LinkeableAction</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/NativeViewRef.html">NativeViewRef</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/NativeViewWithRef.html">NativeViewWithRef</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/NodeDescription.html">NodeDescription</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/NodeDescriptionProps.html">NodeDescriptionProps</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/NodeDescriptionState.html">NodeDescriptionState</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/NodeDescriptionWithChildren.html">NodeDescriptionWithChildren</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols.html#/s:P6Katana22NodeDescriptionWithRef">NodeDescriptionWithRef</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/NodeDescriptionWithRefProps.html">NodeDescriptionWithRefProps</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/PlasticNodeDescription.html">PlasticNodeDescription</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/PlasticReferenceSizeable.html">PlasticReferenceSizeable</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/PlatformNativeView.html">PlatformNativeView</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/SideEffectDependencyContainer.html">SideEffectDependencyContainer</a>
                </li>
                <li class="nav-group-task">
                  <a href="Protocols/State.html">State</a>
                </li>
              </ul>
            </li>
            <li class="nav-group-name">
              <a href="Structs.html">Structs</a>
              <ul class="nav-group-tasks">
                <li class="nav-group-task">
                  <a href="Structs/ActionLinker.html">ActionLinker</a>
                </li>
                <li class="nav-group-task">
                  <a href="Structs/ActionLinks.html">ActionLinks</a>
                </li>
                <li class="nav-group-task">
                  <a href="Structs/Anchor.html">Anchor</a>
                </li>
                <li class="nav-group-task">
                  <a href="Structs/Anchor/Kind.html">– Kind</a>
                </li>
                <li class="nav-group-task">
                  <a href="Structs/Animation.html">Animation</a>
                </li>
                <li class="nav-group-task">
                  <a href="Structs/AnimationContainer.html">AnimationContainer</a>
                </li>
                <li class="nav-group-task">
                  <a href="Structs/AnimationOptions.html">AnimationOptions</a>
                </li>
                <li class="nav-group-task">
                  <a href="Structs/AnimationProps.html">AnimationProps</a>
                </li>
                <li class="nav-group-task">
                  <a href="Structs/ChildrenAnimations.html">ChildrenAnimations</a>
                </li>
                <li class="nav-group-task">
                  <a href="Structs/EdgeInsets.html">EdgeInsets</a>
                </li>
                <li class="nav-group-task">
                  <a href="Structs/EmptyProps.html">EmptyProps</a>
                </li>
                <li class="nav-group-task">
                  <a href="Structs/EmptyState.html">EmptyState</a>
                </li>
                <li class="nav-group-task">
                  <a href="Structs/Size.html">Size</a>
                </li>
                <li class="nav-group-task">
                  <a href="Structs/Value.html">Value</a>
                </li>
              </ul>
            </li>
            <li class="nav-group-name">
              <a href="Typealiases.html">Typealiases</a>
              <ul class="nav-group-tasks">
                <li class="nav-group-task">
                  <a href="Typealiases.html#/s:6Katana25AnimationPropsTransformer">AnimationPropsTransformer</a>
                </li>
                <li class="nav-group-task">
                  <a href="Typealiases.html#/s:6Katana21AnyRefCallbackClosure">AnyRefCallbackClosure</a>
                </li>
                <li class="nav-group-task">
                  <a href="Typealiases.html#/s:6Katana20NodeUpdateCompletion">NodeUpdateCompletion</a>
                </li>
                <li class="nav-group-task">
                  <a href="Typealiases.html#/s:6Katana18RefCallbackClosure">RefCallbackClosure</a>
                </li>
                <li class="nav-group-task">
                  <a href="Typealiases.html#/s:6Katana13StoreDispatch">StoreDispatch</a>
                </li>
                <li class="nav-group-task">
                  <a href="Typealiases.html#/s:6Katana13StoreListener">StoreListener</a>
                </li>
                <li class="nav-group-task">
                  <a href="Typealiases.html#/s:6Katana15StoreMiddleware">StoreMiddleware</a>
                </li>
                <li class="nav-group-task">
                  <a href="Typealiases.html#/s:6Katana16StoreUnsubscribe">StoreUnsubscribe</a>
                </li>
              </ul>
            </li>
            <li class="nav-group-name">
              <a href="Associated Types.html">Associated Types</a>
              <ul class="nav-group-tasks">
                <li class="nav-group-task">
                  <a href="Associated Types.html#/s:P6Katana27NodeDescriptionWithChildren9PropsType">PropsType</a>
                </li>
              </ul>
            </li>
          </ul>
        </nav>
        <article class="main-content">
          <section>
            <section class="section">
              <h1>Classes</h1>
              <p>The following classes are available globally.</p>
  
            </section>
            <section class="section task-group-section">
              <div class="task-group">
                <ul>
                  <li class="item">
                    <div>
                      <code>
                      <a name="/s:C6Katana4Node"></a>
                      <a name="//apple_ref/swift/Class/Node" class="dashAnchor"></a>
                      <a class="token" href="#/s:C6Katana4Node">Node</a>
                      </code>
                    </div>
                    <div class="height-container">
                      <div class="pointer-container"></div>
                      <section class="section">
                        <div class="pointer"></div>
                        <div class="abstract">
                          <p>Katana works by representing the UI as a tree.
  Beside the tree managed by UIKit/AppKit with UIView/NSView (or subclasses) instances through PlatformNativeViews,
  Katana holds a tree of instances of <code>Node</code>. The tree is composed as follows:</p>
  
  <ul>
  <li><p>each node of the tree is an instance of PlatformNativeView (baked by UIKit/AppKit or subclasses);</p></li>
  <li><p>the edges between nodes represent the parent/children (or view/subviews) relation.</p></li>
  </ul>
  
  <p>Each <code>Node</code> instance is characterized by a description (which is an implementation of <code><a href="Protocols/NodeDescription.html">NodeDescription</a></code>).
  Since descriptions are stateless, the <code>Node</code> also holds properties and state. It is also in charge of managing the lifecycle
  of the UI and in particular to invoke the methods <code>childrenDescriptions</code> and
  <code>applyPropsToNativeView</code> of <code><a href="Protocols/NodeDescription.html">NodeDescription</a></code> when needed.</p>
  
  <p>In general this class is never used during the development of an application. Developers usually work with <code><a href="Protocols/NodeDescription.html">NodeDescription</a></code>.</p>
  
  <p><a href='#managed-children' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='managed-children'>Managed Children</h2></p>
  
  <p>Most of the time, <code>Node</code> is able to generate and handle its children automatically by using the description methods.</p>
  
  <p>That being said, there are cases where this is not possible
  (e.g., in a table, when you need to generate and handle the nodes contained in the cells).
  In order to maintain an unique tree to represent the UI, we ask to handle these
  cases manually by invoking two methods: <code>addManagedChild(with:in:)</code> and <code>removeManagedChild(node:)</code>.</p>
  
  <p>Having a single tree is important for several reasons.
  For example we may want to run automatic tests on the tree and verify some conditions (e.g., there is a button).</p>
  
  <p>Managed children are added to act as a workaround of a current limitation of Katana.
  We definitively want to remove this limitation and automate the management of the children in all the cases.</p>
  
                          <a href="Classes/Node.html" class="slightly-smaller">See more</a>
                        </div>
                        <div class="declaration">
                          <h4>Declaration</h4>
                          <div class="language">
                            <p class="aside-title">Swift</p>
                            <pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">Node</span><span class="o">&lt;</span><span class="kt">Description</span><span class="p">:</span> <span class="kt"><a href="Protocols/NodeDescription.html">NodeDescription</a></span><span class="o">&gt;</span></code></pre>
  
                          </div>
                        </div>
                        <div class="slightly-smaller">
                          <a href="https://github.com/BendingSpoons/katana-swift/tree/0.8.5/Katana/Core/Node/Node.swift#L46-L175">Show on GitHub</a>
                        </div>
                      </section>
                    </div>
                  </li>
                </ul>
              </div>
              <div class="task-group">
                <ul>
                  <li class="item">
                    <div>
                      <code>
                      <a name="/s:C6Katana8Renderer"></a>
                      <a name="//apple_ref/swift/Class/Renderer" class="dashAnchor"></a>
                      <a class="token" href="#/s:C6Katana8Renderer">Renderer</a>
                      </code>
                    </div>
                    <div class="height-container">
                      <div class="pointer-container"></div>
                      <section class="section">
                        <div class="pointer"></div>
                        <div class="abstract">
                          <p>This class has the responsibility to render the nodes tree starting from the description of the root node.
  It will also update the rendering to reflect the changes happening in the <code><a href="Classes/Store.html">Store</a></code>.</p>
  
  <pre class="highlight plaintext"><code>// in the App Delegate
  let store = getStore()
  
  // renderer should be retained, otherwise the all tree will be removed
  // create the renderer starting from the description of the root node and the store
  // (optional, only if you want the UI to be updated reflecting the store changes)
  self.renderer = Renderer(rootDescription: counterScreen, store: store)
  renderer!.render(in: view)
  </code></pre>
  
                          <a href="Classes/Renderer.html" class="slightly-smaller">See more</a>
                        </div>
                        <div class="declaration">
                          <h4>Declaration</h4>
                          <div class="language">
                            <p class="aside-title">Swift</p>
                            <pre class="highlight"><code><span class="n">open</span> <span class="kd">class</span> <span class="kt">Renderer</span></code></pre>
  
                          </div>
                        </div>
                        <div class="slightly-smaller">
                          <a href="https://github.com/BendingSpoons/katana-swift/tree/0.8.5/Katana/Core/Renderer/Renderer.swift#L26-L141">Show on GitHub</a>
                        </div>
                      </section>
                    </div>
                  </li>
                </ul>
              </div>
              <div class="task-group">
                <ul>
                  <li class="item">
                    <div>
                      <code>
                      <a name="/s:C6Katana17StateMockProvider"></a>
                      <a name="//apple_ref/swift/Class/StateMockProvider" class="dashAnchor"></a>
                      <a class="token" href="#/s:C6Katana17StateMockProvider">StateMockProvider</a>
                      </code>
                    </div>
                    <div class="height-container">
                      <div class="pointer-container"></div>
                      <section class="section">
                        <div class="pointer"></div>
                        <div class="abstract">
                          <p><code>StateMockProvider</code> is a class that can be used to mock the internal state of the descriptions
  for testing purposes.</p>
  
  <p>The basic idea is that the class encaspulates the possible mocks that are defined for a certain test case.
  State mocks are defined in relation to a Description type and a filter. When the UI is rendered, and a
  mock state provider is provided, Katana asks to the provider if there is a mocked state for the description
  it is managing given the props the description has. If there is a mocked state, this state overrides the state.</p>
  
  <p>It is important to note that this mechanism basically inhibits the <code>update</code> method in the descriptions.</p>
  
  <div class="aside aside-warning">
      <p class="aside-title">Warning</p>
      it is important to remember that order matters. If two mocked state are available for the same context
  (that is, description and props), the first will be used.
  
  </div>
  
  <p><a href='#usage' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='usage'>Usage</h3>
  <pre class="highlight swift"><code><span class="k">let</span> <span class="nv">mock</span> <span class="o">=</span> <span class="kt">StateMockProvider</span><span class="p">()</span></p>
  
  <p><span class="n">mock</span><span class="o">.</span><span class="nf">mockState</span><span class="p">(</span><span class="kt">ADescription</span><span class="o">.</span><span class="kt">State</span><span class="p">(),</span> <span class="nv">for</span><span class="p">:</span> <span class="kt">ADescription</span><span class="o">.</span><span class="k">Type</span><span class="p">,</span> <span class="nv">passingFilter</span><span class="p">:</span> <span class="p">{</span> <span class="n">props</span> <span class="k">in</span>
  <span class="c1">// return true or false based on the props</span>
  <span class="p">})</span></p>
  
  <p><span class="k">let</span> <span class="nv">renderer</span> <span class="o">=</span> <span class="kt">Renderer</span><span class="p">(</span><span class="nv">rootDescription</span><span class="p">:</span> <span class="n">description</span><span class="p">,</span> <span class="nv">store</span><span class="p">:</span> <span class="n">store</span><span class="p">,</span> <span class="nv">stateMockProvider</span><span class="p">:</span> <span class="n">mock</span><span class="p">)</span>
  </code></pre></p>
  
                          <a href="Classes/StateMockProvider.html" class="slightly-smaller">See more</a>
                        </div>
                        <div class="declaration">
                          <h4>Declaration</h4>
                          <div class="language">
                            <p class="aside-title">Swift</p>
                            <pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">StateMockProvider</span></code></pre>
  
                          </div>
                        </div>
                        <div class="slightly-smaller">
                          <a href="https://github.com/BendingSpoons/katana-swift/tree/0.8.5/Katana/Core/Renderer/StateMockProvider.swift#L36-L101">Show on GitHub</a>
                        </div>
                      </section>
                    </div>
                  </li>
                </ul>
              </div>
              <div class="task-group">
                <ul>
                  <li class="item">
                    <div>
                      <code>
                      <a name="/s:C6Katana11PlasticNode"></a>
                      <a name="//apple_ref/swift/Class/PlasticNode" class="dashAnchor"></a>
                      <a class="token" href="#/s:C6Katana11PlasticNode">PlasticNode</a>
                      </code>
                    </div>
                    <div class="height-container">
                      <div class="pointer-container"></div>
                      <section class="section">
                        <div class="pointer"></div>
                        <div class="abstract">
                          <p>Subclass of <code><a href="Classes/Node.html">Node</a></code> that implements all the logic needed to use the Plastic layout system.</p>
  
  <div class="aside aside-see-also">
      <p class="aside-title">See also</p>
      <code><a href="Protocols/PlasticNodeDescription.html">PlasticNodeDescription</a></code>
  
  </div>
  
                          <a href="Classes/PlasticNode.html" class="slightly-smaller">See more</a>
                        </div>
                        <div class="declaration">
                          <h4>Declaration</h4>
                          <div class="language">
                            <p class="aside-title">Swift</p>
                            <pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">PlasticNode</span><span class="o">&lt;</span><span class="kt">Description</span><span class="p">:</span> <span class="kt"><a href="Protocols/PlasticNodeDescription.html">PlasticNodeDescription</a></span><span class="o">&gt;</span><span class="p">:</span> <span class="kt"><a href="Classes/Node.html">Node</a></span><span class="o">&lt;</span><span class="kt">Description</span><span class="o">&gt;</span></code></pre>
  
                          </div>
                        </div>
                        <div class="slightly-smaller">
                          <a href="https://github.com/BendingSpoons/katana-swift/tree/0.8.5/Katana/Plastic/PlasticNode.swift#L17-L104">Show on GitHub</a>
                        </div>
                      </section>
                    </div>
                  </li>
                </ul>
              </div>
              <div class="task-group">
                <ul>
                  <li class="item">
                    <div>
                      <code>
                      <a name="/s:C6Katana11PlasticView"></a>
                      <a name="//apple_ref/swift/Class/PlasticView" class="dashAnchor"></a>
                      <a class="token" href="#/s:C6Katana11PlasticView">PlasticView</a>
                      </code>
                    </div>
                    <div class="height-container">
                      <div class="pointer-container"></div>
                      <section class="section">
                        <div class="pointer"></div>
                        <div class="abstract">
                          <p>This class basically acts as an abstraction over views created through Katana.
  The idea is that Plastic will create a <code>PlasticView</code> for each node description returned by
  <code>childrenDescriptions(props:state:update:dispatch:)</code>. You can then apply Plastic methods
  over the instances of <code>PlasticView</code> and achieve the desidered layout.</p>
  
  <p>This abstraction has been introduced to avoid to deal directly with <code>UIView</code> or &lsquo;NSView&rsquo; instances in the Katana
  world. This allows us to implement some optimizations behinde the scenes (e.g., caching).</p>
  
                          <a href="Classes/PlasticView.html" class="slightly-smaller">See more</a>
                        </div>
                        <div class="declaration">
                          <h4>Declaration</h4>
                          <div class="language">
                            <p class="aside-title">Swift</p>
                            <pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">PlasticView</span></code></pre>
  
                          </div>
                        </div>
                        <div class="slightly-smaller">
                          <a href="https://github.com/BendingSpoons/katana-swift/tree/0.8.5/Katana/Plastic/PlasticView.swift#L30-L386">Show on GitHub</a>
                        </div>
                      </section>
                    </div>
                  </li>
                </ul>
              </div>
              <div class="task-group">
                <ul>
                  <li class="item">
                    <div>
                      <code>
                      <a name="/s:C6Katana14ViewsContainer"></a>
                      <a name="//apple_ref/swift/Class/ViewsContainer" class="dashAnchor"></a>
                      <a class="token" href="#/s:C6Katana14ViewsContainer">ViewsContainer</a>
                      </code>
                    </div>
                    <div class="height-container">
                      <div class="pointer-container"></div>
                      <section class="section">
                        <div class="pointer"></div>
                        <div class="abstract">
                          <p>This class is used to encapsulate the logic to store and retrieve <code><a href="Classes/PlasticView.html">PlasticView</a></code> instances
  during the <code>layout</code> operation. In general, a <code>ViewsContainer</code> is related to a single <code><a href="Protocols/NodeDescription.html">NodeDescription</a></code>
  instance, and the managed views are the descriptions of the children.</p>
  
  <p>It is generic over the <code>Key</code> parameter to enforce the type checking
  in the subscript used to retrieve the instances of <code><a href="Classes/PlasticView.html">PlasticView</a></code>.</p>
  
  <p>The typical usage in a layout of a <code>ViewsContainer</code> instance is the following:</p>
  
  <pre class="highlight plaintext"><code>// to get the native view
  let nativeView = views.nativeView
  
  // to get the PlasticView instance related to `.key`
  let keyView = views[.key] // please note that an optional value is returned
  </code></pre>
  
  <div class="aside aside-see-also">
      <p class="aside-title">See also</p>
      <code><a href="Protocols/PlasticNodeDescription.html">PlasticNodeDescription</a></code>
  
  </div>
  
                          <a href="Classes/ViewsContainer.html" class="slightly-smaller">See more</a>
                        </div>
                        <div class="declaration">
                          <h4>Declaration</h4>
                          <div class="language">
                            <p class="aside-title">Swift</p>
                            <pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ViewsContainer</span><span class="o">&lt;</span><span class="kt">Key</span><span class="o">&gt;</span></code></pre>
  
                          </div>
                        </div>
                        <div class="slightly-smaller">
                          <a href="https://github.com/BendingSpoons/katana-swift/tree/0.8.5/Katana/Plastic/ViewsContainer.swift#L52-L176">Show on GitHub</a>
                        </div>
                      </section>
                    </div>
                  </li>
                </ul>
              </div>
              <div class="task-group">
                <ul>
                  <li class="item">
                    <div>
                      <code>
                      <a name="/s:C6Katana34EmptySideEffectDependencyContainer"></a>
                      <a name="//apple_ref/swift/Class/EmptySideEffectDependencyContainer" class="dashAnchor"></a>
                      <a class="token" href="#/s:C6Katana34EmptySideEffectDependencyContainer">EmptySideEffectDependencyContainer</a>
                      </code>
                    </div>
                    <div class="height-container">
                      <div class="pointer-container"></div>
                      <section class="section">
                        <div class="pointer"></div>
                        <div class="abstract">
                          <p>An empty dependencies container. It can be used for testing purposes or you don&rsquo;t need dependencies</p>
  
                          <a href="Classes/EmptySideEffectDependencyContainer.html" class="slightly-smaller">See more</a>
                        </div>
                        <div class="declaration">
                          <h4>Declaration</h4>
                          <div class="language">
                            <p class="aside-title">Swift</p>
                            <pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">EmptySideEffectDependencyContainer</span><span class="p">:</span> <span class="kt"><a href="Protocols/SideEffectDependencyContainer.html">SideEffectDependencyContainer</a></span></code></pre>
  
                          </div>
                        </div>
                        <div class="slightly-smaller">
                          <a href="https://github.com/BendingSpoons/katana-swift/tree/0.8.5/Katana/Store/SideEffectDependencyContainer.swift#L25-L33">Show on GitHub</a>
                        </div>
                      </section>
                    </div>
                  </li>
                </ul>
              </div>
              <div class="task-group">
                <ul>
                  <li class="item">
                    <div>
                      <code>
                      <a name="/s:C6Katana5Store"></a>
                      <a name="//apple_ref/swift/Class/Store" class="dashAnchor"></a>
                      <a class="token" href="#/s:C6Katana5Store">Store</a>
                      </code>
                    </div>
                    <div class="height-container">
                      <div class="pointer-container"></div>
                      <section class="section">
                        <div class="pointer"></div>
                        <div class="abstract">
                          <p>The <code>Store</code> class contains and manages the state of the application and the
  updates to the state itself.</p>
  
  <p>In Katana, every relevant information in the application should be stored in the
  Store&rsquo;s state. The only way to update the state is to dispatch an <code><a href="Protocols/Action.html">Action</a></code>. At this point
  the store will execute the following operations:</p>
  
  <ul>
  <li>it executes the middleware</li>
  <li>it creates the new state, by invoking the <code>updateState</code> function of the action</li>
  <li>it updates the state</li>
  <li>it executes the side effect of the action, if implemented (see <code><a href="Protocols/ActionWithSideEffect.html">ActionWithSideEffect</a></code>)</li>
  <li>it invokes all the listeners</li>
  </ul>
  
  <p><a href='#ui-integration' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h4 id='ui-integration'>UI Integration</h4></p>
  
  <p>You typically don&rsquo;t deal directly with the store in the UI.
  Katana will update the UI automatically when the state changes. It will also allow you to
  get pieces of information from the store&rsquo;s state when you need them.
  See <code><a href="Protocols/ConnectedNodeDescription.html">ConnectedNodeDescription</a></code> for more information about this topic</p>
  
                          <a href="Classes/Store.html" class="slightly-smaller">See more</a>
                        </div>
                        <div class="declaration">
                          <h4>Declaration</h4>
                          <div class="language">
                            <p class="aside-title">Swift</p>
                            <pre class="highlight"><code><span class="n">open</span> <span class="kd">class</span> <span class="kt">Store</span><span class="o">&lt;</span><span class="kt">StateType</span><span class="p">:</span> <span class="kt"><a href="Protocols/State.html">State</a></span><span class="o">&gt;</span></code></pre>
  
                          </div>
                        </div>
                        <div class="slightly-smaller">
                          <a href="https://github.com/BendingSpoons/katana-swift/tree/0.8.5/Katana/Store/Store.swift#L53-L168">Show on GitHub</a>
                        </div>
                      </section>
                    </div>
                  </li>
                </ul>
              </div>
            </section>
          </section>
          <section id="footer">
            <p>&copy; 2017 <a class="link" href="http://bendingspoons.com" target="_blank" rel="external">Bending Spoons Team</a>. All rights reserved. (Last updated: 2017-05-30)</p>
            <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
          </section>
        </article>
      </div>
    </body>
  </div>
  </html>
  