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
The key property is write only property, that can be placed on props, but react warns if you're trying to access it from within a component. It would be nice to find a proper way to encode this. Better than just adding key to property type. The simplest soluting would be to have an unsafe method:
setKey :: forall a. String -> a -> a
Another solution would be to have a a class with a setKey method, but then for every prop type one would have to implement it (maybe generic deriving could help with this).
Any other ideas?
The text was updated successfully, but these errors were encountered:
The
key
property is write only property, that can be placed on props, but react warns if you're trying to access it from within a component. It would be nice to find a proper way to encode this. Better than just adding key to property type. The simplest soluting would be to have an unsafe method:Another solution would be to have a a class with a
setKey
method, but then for every prop type one would have to implement it (maybe generic deriving could help with this).Any other ideas?
The text was updated successfully, but these errors were encountered: