Skip to content

Commit

Permalink
Add documentation to notifyListeners function
Browse files Browse the repository at this point in the history
  • Loading branch information
fluiddot committed Apr 26, 2022
1 parent f8690db commit 8a2e041
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/react-native-aztec/src/AztecInputState.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ export const removeFocusChangeListener = ( listener ) => {
}
};

/**
* Notifies listeners about changes in focus.
*
* @param {Object} event Event data to be notified to listeners.
* @param {boolean} event.isFocused True if any Aztec view is currently focused.
*/
const notifyListeners = ( { isFocused } ) => {
focusChangeListeners.forEach( ( listener ) => {
listener( { isFocused } );
Expand Down

0 comments on commit 8a2e041

Please sign in to comment.