title: React Konva center text in square
body: <p>I am trying to create a button with some text centred using a <code>Rect</code> and a <code>Text</code> component.</p>
  <p>Here is a piece of code:</p>
  <pre><code>        &lt;Stage&gt;
              &lt;Layer&gt;
                  &lt;Rect
                      x={window.innerWidth - 50}
                      y={window.innerHeight - 50}
                      width={30}
                      height={30}
                      fill='#f2f1f0'
                      stroke='#777'
                      strokeWidth={1}
                  &gt;
                  &lt;Text
                    fontSize={20}
                    text=&quot;+&quot;
                    stroke='#777'
                    strokeWidth={1}
                    align=&quot;center&quot;
                  /&gt;
                 &lt;Rect /&gt;
              &lt;/Layer&gt;
          &lt;/Stage&gt;
  </code></pre>
  <p>But I got this error :</p>
  <pre><code>Uncaught (in promise) TypeError: parentInstance.add is not a function
  </code></pre>
  <p>Is there a right way to put the <code>Text</code> component inside the <code>Rect</code> component?</p>