Skip to content

Commit

Permalink
Update ViewConfigIgnore comment
Browse files Browse the repository at this point in the history
Summary:
This comment was out of date.

Changelog: [Internal]

Reviewed By: sshic

Differential Revision: D34113966

fbshipit-source-id: 0768baa9238736aea26e354792096fea6bb7fcdb
  • Loading branch information
RSNara authored and facebook-github-bot committed Feb 10, 2022
1 parent 172f990 commit e254073
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions Libraries/NativeComponent/ViewConfigIgnore.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,16 @@ export function DynamicallyInjectedByGestureHandler<T: {...}>(object: T): T {
}

/**
* On iOS, ViewManager events declarations generate {eventName}: true entries
* in ViewConfig valueAttributes. In our Static ViewConfig infra, we generate
* these {eventName}: true entries during runtime by inspecting a ViewConfig's
* bubblingEventTypes, and directEventTypes.
* On iOS, ViewManager event declarations generate {eventName}: true entries
* in ViewConfig valueAttributes. These entries aren't generated for Android.
* This annotation allows Static ViewConfigs to insert these entries into
* iOS but not Android.
*
* However, not all event declarations generate these {eventName}: true entries.
* So, the ViewConfig infra generates extra {eventName}: true entries for some
* events. These extra entries are harmless. So, the logic below makes the ViewConfig
* Validator ignore all extra {eventName}: true entries in static ViewConfig
* validAttributes.
* In the future, we want to remove this platform-inconsistency.
* This annotation also allows us to safely test this removal by setting
* global.RN$ViewConfigEventValidAttributesDisabled = true server-side.
*
* TODO(T110872225): Remove this logic
* TODO(T110872225): Remove this logic, after achieving platform-consistency
*/
export function ConditionallyIgnoredEventHandlers<T: {[name: string]: true}>(
value: T,
Expand Down

0 comments on commit e254073

Please sign in to comment.