10000 Warn on double render by Vagab · Pull Request #735 · yippee-fun/phlex · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Warn on double render #735

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

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
A2E3
5 changes: 5 additions & 0 deletions lib/phlex/sgml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ def __final_call__(buffer = +"", context: Phlex::Context.new, view_context: nil,
@_context = context
@_view_context = view_context
@_parent = parent
if @_rendered
warn "⚠️ [WARNING] You are rendering a component #{self.class.name} twice. This is not supported in Phlex 2.0."
end
@_rendered = true

if fragments
warn "⚠️ [WARNING] Selective Rendering is experimental, incomplete, and may change in future versions."
@_context.target_fragments(fragments)
Expand Down
0