Conversation
Greptile SummaryThis PR migrates all anchor elements in the
Confidence Score: 4/5Safe to merge only if full-page reloads on internal links are acceptable; otherwise needs revisiting for paths like One P1 finding: all internal navigation links now trigger full-page reloads because marketing_navbar.py and footer.py contain internal navigation links that will lose SPA client-side routing behavior; hosting_banner.py also has an internal path affected. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["rx.el.a (before)"] -->|"resolves to"| B["ReactRouterLink (react-router Link)"]
B -->|"uses prop"| C["to='/pricing'"]
B -->|"renders"| D["Client-side navigation\n(no page reload)"]
E["rx.el.elements.a (after)"] -->|"resolves to"| F["Raw HTML <a> element"]
F -->|"uses prop"| G["href='/pricing'"]
F -->|"renders"| H["Full-page browser reload"]
style D fill:#bbf,stroke:#336
style H fill:#fbb,stroke:#933
Reviews (1): Last reviewed commit: "update reflex ui links" | Re-trigger Greptile |
| @@ -108,7 +108,7 @@ def logo() -> rx.Component: | |||
| alt="Reflex Logo", | |||
| class_name="shrink-0 hidden dark:block", | |||
| ), | |||
There was a problem hiding this comment.
Internal links lose client-side routing
rx.el.a is deliberately aliased to React Router's Link component (reflex_components_core.react_router.link), as documented in reflex_components_core/el/__init__.py:
# el.a is replaced by React Router's Link.
_EXTRA_MAPPINGS: dict[str, str] = {
"a": "reflex_components_core.react_router.link",
}rx.el.elements.a, by contrast, is the raw HTML <a> element — navigation triggers a full-page reload instead of React Router's client-side transition.
The logo (href="/"), pricing, docs, blog (href="/blog"), customers (href="/customers/"), platform and solutions menu items, and the hosting banner's BLOG_LINK = "/blog/on-premises-deployment" are all internal paths. Switching them to rx.el.elements.a breaks SPA navigation for every one of those links. For external links with target="_blank" this change is fine.
No description provided.