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
Refs is an opaque type, and there's no exported accessors to pull data out from Refs. Similarly, there doesn't seem to be any support in the Props module for establishing a ref in the first place. I'm using a 3rd-party component that has methods on it that need to be triggered from outside, and as best as I can tell, establishing it as a ref is the only real way to do that.
The text was updated successfully, but these errors were encountered:
You should be able to call getRefs in event handlers and lifecycle methods. The Refs type, however, is abstract, and you would have to access it using the FFI or some other approach like purescript-foreign.
I think it is a good point about the ref attribute.
From the docs, it looks like react supports adding a ref callback or a ref string. I think it may be useful to support these cases. Maybe we can add two functions in React.DOM.Props to support this? I'd be happy to add these or a PR also works.
Agreed that currently, the way to go about accessing the Refs type is via the FFI.
I wonder if it might be worth representing Refs as:
typeRefs=StrMapReactComponent
I am not sure if that would be the way to go or not, or how much it buys us, but we could define functions like focus that accept a ReactComponent, etc.
I am open to thoughts and ideas on this, or discussing it further.
Refs
is an opaque type, and there's no exported accessors to pull data out fromRefs
. Similarly, there doesn't seem to be any support in the Props module for establishing a ref in the first place. I'm using a 3rd-party component that has methods on it that need to be triggered from outside, and as best as I can tell, establishing it as a ref is the only real way to do that.The text was updated successfully, but these errors were encountered: