Skip to content

Commit 8477156

Browse files
committed
rename config option
1 parent cd9f527 commit 8477156

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

docs/source/about/changelog.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ Unreleased
3030

3131
**Added**
3232

33-
- :pull:`1165` - Allow concurrent renders of distinct components - enable this
34-
experimental feature by setting `REACTPY_FEATURE_CONCURRENT_RENDERING=true`.
35-
This should improve the overall responsiveness of your app, particularly when
36-
handling larger renders that would otherwise block faster renders from being
37-
processed.
33+
- :pull:`1165` - Allow concurrent renders of discrete component tree - enable this
34+
experimental feature by setting `REACTPY_ASYNC_RENDERING=true`. This should improve
35+
the overall responsiveness of your app, particularly when handling larger renders
36+
that would otherwise block faster renders from being processed.
3837

3938
v1.0.2
4039
------

src/py/reactpy/reactpy/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def boolean(value: str | bool | int) -> bool:
8181
)
8282
"""A default timeout for testing utilities in ReactPy"""
8383

84-
REACTPY_FEATURE_CONCURRENT_RENDERING = Option(
84+
REACTPY_ASYNC_RENDERING = Option(
8585
"REACTPY_CONCURRENT_RENDERING",
8686
default=False,
8787
mutable=True,

src/py/reactpy/reactpy/core/layout.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
from anyio import Semaphore
3030

3131
from reactpy.config import (
32+
REACTPY_ASYNC_RENDERING,
3233
REACTPY_CHECK_VDOM_SPEC,
3334
REACTPY_DEBUG_MODE,
34-
REACTPY_FEATURE_CONCURRENT_RENDERING,
3535
)
3636
from reactpy.core._life_cycle_hook import LifeCycleHook
3737
from reactpy.core.types import (
@@ -125,7 +125,7 @@ async def deliver(self, event: LayoutEventMessage) -> None:
125125
)
126126

127127
async def render(self) -> LayoutUpdateMessage:
128-
if REACTPY_FEATURE_CONCURRENT_RENDERING.current:
128+
if REACTPY_ASYNC_RENDERING.current:
129129
return await self._concurrent_render()
130130
else: # nocov
131131
return await self._serial_render()
@@ -460,7 +460,7 @@ async def _unmount_model_states(self, old_states: list[_ModelState]) -> None:
460460
to_unmount.extend(model_state.children_by_key.values())
461461

462462
def _schedule_render_task(self, lcs_id: _LifeCycleStateId) -> None:
463-
if not REACTPY_FEATURE_CONCURRENT_RENDERING.current:
463+
if not REACTPY_ASYNC_RENDERING.current:
464464
self._rendering_queue.put(lcs_id)
465465
return None
466466
try:

src/py/reactpy/tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from playwright.async_api import async_playwright
1010

1111
from reactpy.config import (
12-
REACTPY_FEATURE_CONCURRENT_RENDERING,
12+
REACTPY_ASYNC_RENDERING,
1313
REACTPY_TESTING_DEFAULT_TIMEOUT,
1414
)
1515
from reactpy.testing import (
@@ -19,7 +19,7 @@
1919
clear_reactpy_web_modules_dir,
2020
)
2121

22-
REACTPY_FEATURE_CONCURRENT_RENDERING.current = True
22+
REACTPY_ASYNC_RENDERING.current = True
2323

2424

2525
def pytest_addoption(parser: Parser) -> None:

src/py/reactpy/tests/test_core/test_layout.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import reactpy
1212
from reactpy import html
13-
from reactpy.config import REACTPY_DEBUG_MODE, REACTPY_FEATURE_CONCURRENT_RENDERING
13+
from reactpy.config import REACTPY_ASYNC_RENDERING, REACTPY_DEBUG_MODE
1414
from reactpy.core.component import component
1515
from reactpy.core.hooks import use_effect, use_state
1616
from reactpy.core.layout import Layout
@@ -33,7 +33,7 @@
3333

3434
@pytest.fixture(autouse=True, params=[True, False])
3535
def concurrent_rendering(request):
36-
with patch.object(REACTPY_FEATURE_CONCURRENT_RENDERING, "current", request.param):
36+
with patch.object(REACTPY_ASYNC_RENDERING, "current", request.param):
3737
yield request.param
3838

3939

0 commit comments

Comments
 (0)