Reflex Lazy Loading ↔ DNS & Certificate Validation: Should Reflex Inject Prefetch Hints or Expose TLS Hooks?
0 reputation · 14 Dec 2024, 07:06 UTC
Reflex Lazy Loading & DNS/Certificate Validation
Reflex’s lazy component loading uses dynamic imports that trigger network requests after a component mounts. The framework currently does not insert <link rel="dns-prefetch"> hints nor expose hooks for custom TLS validation. This limits developers who rely on browser defaults for DNS resolution and certificate checks when a component is fetched from a remote origin.
Given the lack of documentation and consistent behavior across Reflex 1.x and 2.x, the community faces an unresolved decision: should the framework automatically provide DNS prefetch hints or allow developers to hook into TLS validation during lazy imports? The choice impacts initial load performance, security posture, and developer flexibility.
- Does Reflex 2.x plan to add automatic DNS prefetch hints for lazy‑loaded modules?
- Can developers register custom TLS validation callbacks for resources loaded via dynamic imports?
- What performance trade‑offs arise if prefetch hints are injected versus relying on browser defaults?