Skip to content

Commit 96f6f81

Browse files
committed
PR #46, review changes
1 parent 05a9eb7 commit 96f6f81

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/reactpy_router/routers.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,13 @@ def router(
7474
match = use_memo(lambda: _match_route(resolvers, location, select="first"))
7575

7676
if match:
77-
# We need skip rendering the application on 'first_load' to avoid
78-
# rendering it twice. The second render occurs following
79-
# the impending on_history_change event
8077

8178
if first_load:
79+
80+
# We need skip rendering the application on 'first_load' to avoid
81+
# rendering it twice. The second render occurs following
82+
# the impending on_history_change event
83+
8284
route_elements = []
8385
else:
8486
route_elements = [

tests/test_rendering.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from reactpy_router import browser_router, route
66

7-
from .tooling.page import page_stable
7+
from .utils import page_stable
88

99

1010
@pytest.mark.anyio
@@ -19,8 +19,6 @@ def root():
1919
nonlocal root_render_count
2020
root_render_count += 1
2121

22-
# https://reactive-python.github.io/reactpy-router/latest/#quick-start
23-
2422
@component
2523
def home_page():
2624
nonlocal home_page_render_count

tests/tooling/__init__.py

Whitespace-only changes.
File renamed without changes.

0 commit comments

Comments
 (0)