You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add keys to models so React doesn't complain of child arrays requiring them #255
Without something like JSX it's just not possible to create keys on the Python side. I'm still not sure if doing JSX in Python is even a good idea, hence #282.
The only way to fix this for now is to generate unique keys in the client for each child element unless they've been explicitly set.
Never mind this needs to be solved server-side since the client doesn't know the identity of the elements. TBH though I don't really know why this isn't already causing bugs. I'm able to change the order of children without experiencing any side effects. Maybe React is just being smart and knows how to solve the problem cases I'm presenting it with?
Activity
rmorshea commentedon Feb 13, 2021
Without something like JSX it's just not possible to create keys on the Python side. I'm still not sure if doing JSX in Python is even a good idea, hence #282.
The only way to fix this for now is to generate unique keys in the client for each child element unless they've been explicitly set.
rmorshea commentedon Feb 13, 2021
Never mind this needs to be solved server-side since the client doesn't know the identity of the elements. TBH though I don't really know why this isn't already causing bugs. I'm able to change the order of children without experiencing any side effects. Maybe React is just being smart and knows how to solve the problem cases I'm presenting it with?
rmorshea commentedon Jul 16, 2021
This is now done.