Skip to content

Commit acb9e58

Browse files
authored
chore: fix contributing documentation (#166)
* chore: fix contributing documentation * Update optimizing-long-running-components.md * Update DrawerNavigator.tsx * Update TabNavigator.tsx * Update createProfiledDrawerNavigator.tsx * Update RenderPassReportGenerator.ts * Update state-controller-context.test.tsx
1 parent cd7d8f9 commit acb9e58

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ We want this community to be **friendly and respectful** to each other. Please f
44

55
## Development workflow
66

7-
To get started with the project, run `yarn bootsrap` in the root directory to install the required dependencies for each package:
7+
To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
88

99
```sh
10-
yarn bootsrap
10+
yarn
1111
```
1212

1313
> This project uses [`yarn`](https://classic.yarnpkg.com/) as a package manager. While it's possible to run individual commands with [`npm`](https://github.com/npm/cli), please refrain from using it, especially `npm install.` 🙅

docs/docs/fundamentals/optimizing-long-running-components.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The library can only provide you with tripwires that certain screens are not per
88

99
However, there is one common category of performance slowdown that is often seen in simple RN apps. If a React component runs for a long time synchronously before returning the renderable JSX, it may cause the navigation to slow down a little.
1010

11-
The `PerformanceMeasureView` can help you optimise such slow navigation animations by delaying the expensive renders until after the animation completes. It can show a lightweight placeholder view while that animation is occuring:
11+
The `PerformanceMeasureView` can help you optimise such slow navigation animations by delaying the expensive renders until after the animation completes. It can show a lightweight placeholder view while that animation is occurring:
1212

1313
```tsx
1414
<PerformanceMeasureView
@@ -19,6 +19,6 @@ The `PerformanceMeasureView` can help you optimise such slow navigation animatio
1919
</PerformanceMeasureView>
2020
```
2121

22-
It is highly encouraged to not use this flag blindly, since it can only optimize a very specific kind of perfomance slowdowns. Using it unnecessarily might actually slow things down even further, since you're adding 1 extra lightweight render pass before rendering the real expensive UI. Please visually verify thoroughly and monitor the render-time scores before opting in.
22+
It is highly encouraged to not use this flag blindly, since it can only optimize a very specific kind of performance slowdowns. Using it unnecessarily might actually slow things down even further, since you're adding 1 extra lightweight render pass before rendering the real expensive UI. Please visually verify thoroughly and monitor the render-time scores before opting in.
2323

2424
This feature uses a ReactNative [`InteractionManager.runAfterInteractions`](https://reactnative.dev/docs/interactionmanager) call under-the-hood to schedule the real expensive render after all the animations are completed.

fixture/src/examples/DrawerNavigator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {NavigationKeys} from '../constants';
99
/**
1010
* This screen simulates an example where multiple screens can be
1111
* mounted in parallel at the same time. Changes in one screen can affect
12-
* some global state (through react context) that can cause a parallely
12+
* some global state (through react context) that can cause a parallelly
1313
* active screen to re-render.
1414
*/
1515

fixture/src/examples/TabNavigator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {NavigationKeys} from '../constants';
99
/**
1010
* This screen simulates an example where multiple screens can be
1111
* mounted in parallel at the same time. Changes in one screen can affect
12-
* some global state (through react context) that can cause a parallely
12+
* some global state (through react context) that can cause a parallelly
1313
* active screen to re-render.
1414
*/
1515

packages/react-native-performance-navigation-drawer/src/createProfiledDrawerNavigator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const createProfiledNavigation = ({
2323

2424
const profiledDispatch: typeof navigation.dispatch = action => {
2525
// Note that the drawer navigator internally uses custom animated touchables
26-
// that do not expose the native press timetamps. So we cannot
26+
// that do not expose the native press timestamps. So we cannot
2727
// compute the `timeToConsumeTouchEvent`.
2828
if ('type' in action && action.type === 'NAVIGATE') {
2929
startProfiler({

packages/react-native-performance/src/RenderPassReportGenerator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const prepareRenderPassStartInfo = async (flowStartState: Started): Promise<Rend
152152
};
153153
} else {
154154
return {
155-
// For in-app navagation, if the user had provided the uiEvent object, mark the
155+
// For in-app navigation, if the user had provided the uiEvent object, mark the
156156
// flowStartTimeSinceEpochMillis as when the native onPress event occurred. If that
157157
// information is not available, fallback to the less accurate JS onPress event.
158158
flowStartTimeSinceEpochMillis: await (flowStartState.timestamp.nativeTimestamp ??

packages/react-native-performance/src/__tests__/state-machine/controller/state-controller-context.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {ErrorHandler, ErrorHandlerContextProvider} from '../../../utils';
77

88
describe('state-machine/controller/state-controller-context', () => {
99
describe('useStateController', () => {
10-
it('provides the state controller instance available throught the context', () => {
10+
it('provides the state controller instance available through the context', () => {
1111
const mockStateController = {
1212
onSomeEvent: jest.fn(),
1313
} as any;

0 commit comments

Comments
 (0)