mirror of
https://github.com/status-im/react-native.git
synced 2025-01-26 17:30:25 +00:00
Tiny grammar fix
Summary: > Explain the **motivation** for making this change. What existing problem does the pull request solve? Comments with correct grammar are easier to read. Closes https://github.com/facebook/react-native/pull/12313 Differential Revision: D4538229 Pulled By: hramos fbshipit-source-id: 69978df3659f2d3e4f5b2ccb4ff6c33dc6b7e56b
This commit is contained in:
parent
dcf7f631f4
commit
e8ba333e0a
@ -103,7 +103,7 @@ Events are described in detail in [this article](docs/native-components-ios.html
|
||||
Events are powerful, because they allow us to change React Native components without needing a reference to them. However, there are some pitfalls that you can fall into while using them:
|
||||
|
||||
* As events can be sent from anywhere, they can introduce spaghetti-style dependencies into your project.
|
||||
* Events share namespace, which means that you may encounter some name collisions. Collisions will not be detected statically, what makes them hard to debug.
|
||||
* Events share namespace, which means that you may encounter some name collisions. Collisions will not be detected statically, which makes them hard to debug.
|
||||
* If you use several instances of the same React Native component and you want to distinguish them from the perspective of your event, you'll likely need to introduce some kind of identifiers and pass them along with events (you can use the native view's `reactTag` as an identifier).
|
||||
|
||||
The common pattern we use when embedding native in React Native is to make the native component's RCTViewManager a delegate for the views, sending events back to JavaScript via the bridge. This keeps related event calls in one place.
|
||||
|
Loading…
x
Reference in New Issue
Block a user