Skip to content

Commit

Permalink
PR #46, review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stevej2608 committed Nov 17, 2024
1 parent 05a9eb7 commit 96f6f81
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/reactpy_router/routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@ def router(
match = use_memo(lambda: _match_route(resolvers, location, select="first"))

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

if first_load:

# We need skip rendering the application on 'first_load' to avoid
# rendering it twice. The second render occurs following
# the impending on_history_change event

route_elements = []
else:
route_elements = [
Expand Down
4 changes: 1 addition & 3 deletions tests/test_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from reactpy_router import browser_router, route

from .tooling.page import page_stable
from .utils import page_stable


@pytest.mark.anyio
Expand All @@ -19,8 +19,6 @@ def root():
nonlocal root_render_count
root_render_count += 1

# https://reactive-python.github.io/reactpy-router/latest/#quick-start

@component
def home_page():
nonlocal home_page_render_count
Expand Down
Empty file removed tests/tooling/__init__.py
Empty file.
File renamed without changes.

0 comments on commit 96f6f81

Please sign in to comment.