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

Document higher order components #353

Open
kylecordes opened this issue Aug 29, 2018 · 1 comment
Open

Document higher order components #353

kylecordes opened this issue Aug 29, 2018 · 1 comment

Comments

@kylecordes
Copy link

Recently, a Svelte user asked if svelte has "higher-order components", like React (and many others). Rich pointed to the following example (which he tweeted previously) ofof doing this.

https://svelte.technology/repl?version=2.10.1&gist=b42e56c57e390b85e7c3c16349205cc6

Therefore, a documentation request: document higher order components in the official Guide.

Although it is a relatively advanced idea (thus some risk of confusing a new reader), nonetheless it would prevent someone comparing alternative technologies, from erroneously concluding that Svelte lacks this capability.

There is more discussion of the details of HOC at sveltejs/svelte#1648 .

@charly22
Copy link

I'm not sure if we should proceed by documenting the solution proposed by Rich as official since it does not provides support for SSR among other concerns.

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

No branches or pull requests

2 participants