Skip to content

Commit 2a0d843

Browse files
author
Riccardo Cipolleschi
committed
fix: push steps in a lower hierarchy level
1 parent 680e467 commit 2a0d843

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/new-architecture-library-intro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ const styles = StyleSheet.create({
414414

415415
In this example when the View is pressed there is a `setNativeProps` call to update the style and accessibility props of the component. To migrate this component its important to understand its current behavior using `setNativeProps`.
416416

417-
### Pre-Fabric, Component Props Persist
417+
#### Pre-Fabric, Component Props Persist
418418

419419
On first render, the component props are those declared in the render function. After the View is pressed `_onSubmit` calls `setNativeProps` with updated prop values.
420420
The resulting component can be represented as such:
@@ -437,7 +437,7 @@ Note that all prop values set in the render function are unchanged even though `
437437

438438
The fact that React Native stores some internal state of each component that isn’t explicitly declared in last render is what Fabric intends to fix.
439439

440-
### Moving `setNativeProps` to state
440+
#### Moving `setNativeProps` to state
441441

442442
Taking those caveats into account, a proper migration would look like this:
443443

@@ -588,7 +588,7 @@ Note:
588588
- The command definition is co-located with the native component. This is an encouraged pattern
589589
- Ensure you have included your command name in `supportedCommands` array
590590
591-
### Using Your Command
591+
#### Using Your Command
592592
593593
```tsx
594594
import {Commands, ... } from './MyCustomMapNativeComponent';
@@ -614,7 +614,7 @@ class MyComponent extends React.Component<Props> {
614614
}
615615
```
616616
617-
### Updating Native implementation
617+
#### Updating Native implementation
618618
619619
In the example the code-generated `Commands` will dispatch `moveToRegion` call to the native component’s view manager. In addition to writing the JS interface, you’ll need to update your native implementation signatures to match the dispatched method call. See the mapping for [Android argument types](https://facebook.github.io/react-native/docs/native-modules-android#argument-types) and[iOS argument types](https://facebook.github.io/react-native/docs/native-modules-ios#argument-types) for reference.
620620

0 commit comments

Comments
 (0)