Skip to content

Commit c0c29e8

Browse files
Fix typos in the documentation (#35439)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> So in this PR the typo mistakes in the docs are corrected such as the 1. **Ie** it should be **"i.e"**. 2. **errros** should be the **"errors"**. 3. **consdier** should be the **"consider"**. 4. **CreatFrom** should be **"CreateForm"**. ## How did you test this change? <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. --> I verified the fixes by reviewing the updated files locally to ensure the corrected terms appear consistently and accurately in the documentation. --------- Co-authored-by: Yummy_Bacon5 <68166338+YummyBacon5@users.noreply.github.com>
1 parent c0d218f commit c0c29e8

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

compiler/docs/DESIGN_GOALS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The idea of React Compiler is to allow developers to use React's familiar declar
88

99
* Bound the amount of re-rendering that happens on updates to ensure that apps have predictably fast performance by default.
1010
* Keep startup time neutral with pre-React Compiler performance. Notably, this means holding code size increases and memoization overhead low enough to not impact startup.
11-
* Retain React's familiar declarative, component-oriented programming model. Ie, the solution should not fundamentally change how developers think about writing React, and should generally _remove_ concepts (the need to use React.memo(), useMemo(), and useCallback()) rather than introduce new concepts.
11+
* Retain React's familiar declarative, component-oriented programming model. i.e, the solution should not fundamentally change how developers think about writing React, and should generally _remove_ concepts (the need to use React.memo(), useMemo(), and useCallback()) rather than introduce new concepts.
1212
* "Just work" on idiomatic React code that follows React's rules (pure render functions, the rules of hooks, etc).
1313
* Support typical debugging and profiling tools and workflows.
1414
* Be predictable and understandable enough by React developers — i.e. developers should be able to quickly develop a rough intuition of how React Compiler works.

compiler/packages/babel-plugin-react-compiler/src/Inference/MUTABILITY_ALIASING_MODEL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The goal of mutability and aliasing inference is to understand the set of instru
2424

2525
In code, the mutability and aliasing model is compromised of the following phases:
2626

27-
* `InferMutationAliasingEffects`. Infers a set of mutation and aliasing effects for each instruction. The approach is to generate a set of candidate effects based purely on the semantics of each instruction and the types of the operands, then use abstract interpretation to determine the actual effects (or errros) that would apply. For example, an instruction that by default has a Capture effect might downgrade to an ImmutableCapture effect if the value is known to be frozen.
27+
* `InferMutationAliasingEffects`. Infers a set of mutation and aliasing effects for each instruction. The approach is to generate a set of candidate effects based purely on the semantics of each instruction and the types of the operands, then use abstract interpretation to determine the actual effects (or errors) that would apply. For example, an instruction that by default has a Capture effect might downgrade to an ImmutableCapture effect if the value is known to be frozen.
2828
* `InferMutationAliasingRanges`. Infers a mutable range (start:end instruction ids) for each value in the program, and annotates each Place with its effect type for usage in later passes. This builds a graph of data flow through the program over time in order to understand which mutations effect which values.
2929
* `InferReactiveScopeVariables`. Given the per-Place effects, determines disjoint sets of values that mutate together and assigns all identifiers in each set to a unique scope, and updates the range to include the ranges of all constituent values.
3030

@@ -69,7 +69,7 @@ Describes the creation of new function value, capturing the given set of mutable
6969
kind: 'Apply';
7070
receiver: Place;
7171
function: Place; // same as receiver for function calls
72-
mutatesFunction: boolean; // indicates if this is a type that we consdier to mutate the function itself by default
72+
mutatesFunction: boolean; // indicates if this is a type that we consider to mutate the function itself by default
7373
args: Array<Place | SpreadPattern | Hole>;
7474
into: Place; // where result is stored
7575
signature: FunctionSignature | null;
@@ -526,7 +526,7 @@ Capture c <- a
526526

527527
Intuition: these effects are inverses of each other (capturing into an object, extracting from an object). The result is based on the order of operations:
528528

529-
Capture then CreatFrom is equivalent to Alias: we have to assume that the result _is_ the original value and that a local mutation of the result could mutate the original.
529+
Capture then CreateFrom is equivalent to Alias: we have to assume that the result _is_ the original value and that a local mutation of the result could mutate the original.
530530

531531
```js
532532
const b = [a]; // capture

0 commit comments

Comments
 (0)