Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix double rendering #46

Merged
merged 5 commits into from
Nov 19, 2024

Conversation

stevej2608
Copy link
Contributor

Description

I noticed that the router renders the application markup twice when the page is first loaded. I've changed the router so
that the the initial render is dismissed. The following on_first_load() event triggers the second render which
proceeds as normal.

All exiting tests pass. I've added an additional test to confirm that double rendering no longer occurs.

Cheers, Steve.

Checklist

Please update this checklist as you complete each item:

  • Tests have been developed for bug fixes or new functionality.
  • The changelog has been updated, if necessary.
  • Documentation has been updated, if necessary.
  • GitHub Issues closed by this PR have been linked.

By submitting this pull request I agree that all contributions comply with this project's open source license(s).

@stevej2608 stevej2608 requested a review from a team as a code owner November 16, 2024 16:35
tests/test_rendering.py Outdated Show resolved Hide resolved
src/reactpy_router/routers.py Outdated Show resolved Hide resolved
tests/tooling/page.py Outdated Show resolved Hide resolved
@stevej2608
Copy link
Contributor Author

I've update the changes as requested. Cheers.

@Archmonger Archmonger merged commit 785d3d2 into reactive-python:main Nov 19, 2024
10 checks passed
@stevej2608
Copy link
Contributor Author

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants