FieldElement

The imperative methods of the native components that can be registered with a field store.

Definition

  • FieldElement
    • focus () => void
    • blur (() => void) | undefined
    • isFocused (() => boolean) | undefined

Explanation

React Native has no DOM elements. Instead of a union of HTML elements, FieldElement is a structural subset of the imperative methods that React Native host component instances provide. This way the refs of TextInput and other focusable native components are accepted without depending on the react-native package.

Only focus is required, as it is what focus calls to focus a field. isFocused is implemented by TextInput and is used to verify that an element actually received focus, so that elements which cannot be focused are skipped.

Methods

Types

Contributors

Thanks to all the contributors who helped make this page better!

  • GitHub profile picture of @fabian-hiller

Partners

Thanks to our partners who support the project ideally and financially.

Sponsors

Thanks to our GitHub sponsors who support the project financially.

  • GitHub profile picture of @vasilii-kovalev
  • GitHub profile picture of @UpwayShop
  • GitHub profile picture of @ruiaraujo012
  • GitHub profile picture of @hyunbinseo
  • GitHub profile picture of @nickytonline
  • GitHub profile picture of @kibertoad
  • GitHub profile picture of @caegdeveloper
  • GitHub profile picture of @Thanaen
  • GitHub profile picture of @bmoyroud
  • GitHub profile picture of @ysknsid25
  • GitHub profile picture of @dslatkin