Skip to content

Commit cb8eaea

Browse files
committed
refactor: rename to concurrentRoot
1 parent 0756fd6 commit cb8eaea

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/__tests__/config.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ test('configure() overrides existing config values', () => {
1616
asyncUtilTimeout: 5000,
1717
defaultDebugOptions: { message: 'debug message' },
1818
defaultIncludeHiddenElements: false,
19-
concurrentRendering: false,
19+
concurrentRoot: false,
2020
});
2121
});
2222

src/__tests__/render.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,11 @@ test('render calls detects host component names', () => {
243243
});
244244

245245
test('supports legacy rendering', () => {
246-
render(<View testID="test" />, { concurrentRendering: false });
246+
render(<View testID="test" />, { concurrentRoot: false });
247247
expect(screen.root).toBeDefined();
248248
});
249249

250250
test('supports concurrent rendering', () => {
251-
render(<View testID="test" />, { concurrentRendering: true });
251+
render(<View testID="test" />, { concurrentRoot: true });
252252
expect(screen.root).toBeDefined();
253253
});

src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export type Config = {
1818
* Set to `true` to enable concurrent rendering.
1919
* Otherwise `render` will default to legacy synchronous rendering.
2020
*/
21-
concurrentRendering: boolean;
21+
concurrentRoot: boolean;
2222
};
2323

2424
export type ConfigAliasOptions = {
@@ -43,7 +43,7 @@ export type InternalConfig = Config & {
4343
const defaultConfig: InternalConfig = {
4444
asyncUtilTimeout: 1000,
4545
defaultIncludeHiddenElements: false,
46-
concurrentRendering: false,
46+
concurrentRoot: false,
4747
};
4848

4949
let config = { ...defaultConfig };

src/render.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface RenderOptions {
2828
* Set to `true` to enable concurrent rendering.
2929
* Otherwise `render` will default to legacy synchronous rendering.
3030
*/
31-
concurrentRendering?: boolean | undefined;
31+
concurrentRoot?: boolean | undefined;
3232

3333
createNodeMock?: (element: React.ReactElement) => unknown;
3434
unstable_validateStringsRenderedWithinText?: boolean;
@@ -54,15 +54,15 @@ export function renderInternal<T>(
5454
) {
5555
const {
5656
wrapper: Wrapper,
57-
concurrentRendering: concurrent,
57+
concurrentRoot,
5858
detectHostComponentNames = true,
5959
unstable_validateStringsRenderedWithinText,
6060
...rest
6161
} = options || {};
6262

6363
const testRendererOptions: TestRendererOptions = {
6464
// @ts-expect-error incomplete typing on RTR package
65-
unstable_isConcurrent: concurrent ?? getConfig().concurrentRendering,
65+
unstable_isConcurrent: concurrentRoot ?? getConfig().concurrentRoot,
6666
...rest,
6767
};
6868

website/docs/12.x/docs/api/misc/config.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type Config = {
77
asyncUtilTimeout: number;
88
defaultHidden: boolean;
99
defaultDebugOptions: Partial<DebugOptions>;
10-
concurrentRendering: boolean;
10+
concurrentRoot: boolean;
1111
};
1212

1313
function configure(options: Partial<Config>) {}
@@ -27,7 +27,7 @@ This option is also available as `defaultHidden` alias for compatibility with [R
2727

2828
Default [debug options](#debug) to be used when calling `debug()`. These default options will be overridden by the ones you specify directly when calling `debug()`.
2929

30-
### `concurrentRendering` option
30+
### `concurrentRoot` option
3131

3232
Set to `true` to enable concurrent rendering used in the React Native New Architecture. Otherwise `render` will default to legacy synchronous rendering.
3333

website/docs/12.x/docs/api/render.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ wrapper?: React.ComponentType<any>,
3232

3333
This option allows you to wrap the tested component, passed as the first option to the `render()` function, in an additional wrapper component. This is useful for creating reusable custom render functions for common React Context providers.
3434

35-
#### `concurrentRendering` option
35+
#### `concurrentRoot` option
3636

3737
Set to `true` to enable concurrent rendering used in the React Native New Architecture. Otherwise `render` will default to legacy synchronous rendering.
3838

0 commit comments

Comments
 (0)