Skip to content

Commit 3fffe95

Browse files
committed
fix: correct typos in user-facing invariant error messages
These typos appear in runtime-thrown invariant messages that developers see when they misuse these APIs: - StateSafePureComponent.js: 'acceessed' -> 'accessed' ('this.state should not be acceessed during state updates') - CellRenderMask.js: 'number os cells' -> 'number of cells' ('CellRenderMask must contain a non-negative number os cells')
1 parent 7fc911a commit 3fffe95

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/virtualized-lists/Lists/CellRenderMask.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class CellRenderMask {
2323
constructor(numCells: number) {
2424
invariant(
2525
numCells >= 0,
26-
'CellRenderMask must contain a non-negative number os cells',
26+
'CellRenderMask must contain a non-negative number of cells',
2727
);
2828

2929
this._numCells = numCells;

‎packages/virtualized-lists/Lists/StateSafePureComponent.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default class StateSafePureComponent<
7474
get() {
7575
invariant(
7676
!that._inAsyncStateUpdate,
77-
'"this.state" should not be acceessed during state updates',
77+
'"this.state" should not be accessed during state updates',
7878
);
7979
return state;
8080
},

0 commit comments

Comments
 (0)