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

use noopener for window.open #4933

Merged
merged 1 commit into from
Mar 10, 2025
Merged

use noopener for window.open #4933

merged 1 commit into from
Mar 10, 2025

Conversation

adhami3310
Copy link
Member

resolves such code from printing the same client token after being redirected in a new tab

import reflex as rx


class State(rx.State):
    @rx.event
    def what_is_my_token(self):
        print(self.router.session.client_token)


def index() -> rx.Component:
    return rx.vstack(
        rx.button("What is my token?", on_click=State.what_is_my_token),
        rx.button("Redirect to /", on_click=rx.redirect("/", is_external=True)),
    )


app = rx.App()
app.add_page(index)

Copy link

codspeed-hq bot commented Mar 10, 2025

CodSpeed Performance Report

Merging #4933 will not alter performance

Comparing use-noopener-for-window-open (22c9146) with main (b868bc7)

Summary

✅ 12 untouched benchmarks

@adhami3310
Copy link
Member Author

i swear whenever i touch a JS file we get new formatting changes, we should at some point add prettier to our precommit, but i don't want to

@Alek99 Alek99 self-requested a review March 10, 2025 22:01
@adhami3310 adhami3310 merged commit d90b283 into main Mar 10, 2025
43 checks passed
@adhami3310 adhami3310 deleted the use-noopener-for-window-open branch March 10, 2025 22:07
adhami3310 added a commit that referenced this pull request Mar 11, 2025
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