-</code></pre><p>These are slightly more readable, but are still not really appropriate to actually build a user interface! For that we need to understand how to customize components.</p><h3 id="customizing-components">Customizing Components</h3><p>More likely than JSON-like strings, you will want to customize or compose the rendering of parts of the <a href="/api/store/interfaces/store/store/"><code>Store</code></a> for your UI. The way this works is that each of the react-ui module components has a prop that takes an alternative rendering for its children.</p><p>For example, the <a href="/api/ui-react/functions/store-components/tableview/"><code>TableView</code></a> component takes a <code>rowComponent</code> prop that lets you indicate how the each <a href="/api/store/type-aliases/store/row/"><code>Row</code></a> should be rendered, and the <a href="/api/ui-react/functions/store-components/rowview/"><code>RowView</code></a> component takes a <code>cellComponent</code> prop that lets you indicate how each <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a> should be rendered. The component passed in to such props itself needs to be capable of taking the same props that the default component would have.</p><p>To render the contents of a <a href="/api/store/type-aliases/store/table/"><code>Table</code></a> into an HTML table, therefore, you might set the components up like this:</p><pre><code><span class="keyword">const</span> <span class="function-variable">MyTableView</span> <span class="operator">=</span> <span class="punctuation">(</span><span class="parameter">props</span><span class="punctuation">)</span> <span class="operator">=></span> <span class="punctuation">(</span>
0 commit comments