Skip to content

Implement fireEvent API #7

Closed
Closed
@thymikee

Description

@thymikee

See https://github.com/kentcdodds/react-testing-library#fireeventeventnamenode-htmlelement-eventproperties-object.

In RN world we could use it like

fireEvent.press(button);
fireEvent.doublePress(button);
fireEvent.changeText(textInput);
fireEvent.scroll(scrollView);

I'd like this to only have events that can be triggered by the user on core components.
Since any "basic" component like Picker, Checkbox, RadioButton can (and usually is) be implemented in user-land, I don't think there's room for so many events as in DOM world.

Accessing props directly would still be possible, because we probably shouldn't care about underlying native implementation (e.g. for gesture handlers)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions