Closed mishoboss closed 7 years ago
Any updates on this? @dantrain
I'm not sure what to do about this, the grid needs to be able to update its children's style prop. Perhaps I could pass the new styles through but then you'd have to muck about applying them in your own component, and it would no longer be reusable. I could wrap children in <div>
s automatically but what if you wanted a different tag name or certain attributes?
For now I have updated the Readme to suggest wrapping your components:
<SpringGrid
component="ul"
// ...etc.
>
{data.map((datum) => (
<li key={datum.id}>
<MyComponent datum={datum} />
</li>
))}
</SpringGrid>
In the next release I will check and throw friendly errors explaining the need to do this so no more stack overflow hopefully!
Any better ideas?
Looks like it expects DOM elements only and when React components supplied as children, there is an error shown
KeyEscapeUtils.js?ac04:28 Uncaught RangeError: Maximum call stack size exceeded