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

Add socket prop to skip ssr for live mounts and navigation #74

Merged
merged 1 commit into from Aug 20, 2023

Conversation

vonagam
Copy link
Contributor

@vonagam vonagam commented Aug 18, 2023

Closes #73.

Added socket prop and updated views in example project to use it. Sigil uses it automatically.

Removed get_ssr util method.

In generated live components class was not removed from props and svelte_opts were even though they are not used there. Fixed.

{k, _v} -> k not in [:__changed__, :__given__, :ssr]
_ -> false
end)
props = Map.drop(assigns, [:__changed__, :__given__, :ssr, :class, :socket])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

lib/component.ex Outdated Show resolved Hide resolved
@woutdp woutdp merged commit 6cb9ce7 into woutdp:master Aug 20, 2023
@woutdp
Copy link
Owner

woutdp commented Aug 20, 2023

Available in 0.12.0

@vonagam vonagam deleted the add-socket-prop branch August 20, 2023 04:06
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.

Excessive SSR for LiveViews
2 participants