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

Improve docs for component/app development #350

Closed
ghost opened this issue Jun 7, 2022 · 5 comments
Closed

Improve docs for component/app development #350

ghost opened this issue Jun 7, 2022 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@ghost
Copy link

ghost commented Jun 7, 2022

What needs discussing?

I would like to suggest some new docs about developing Svelte components.

Why is this important?

Since developing my app, I've ran into two issues that happened one after the other, which both are connected to two different issues.

  1. (A) New component root property may throw errors svelte#6584, which I was able to fix by downgrading to svelte@^3.39.0, but led to ⬇️
  2. (B) Outros undefined when transitioning to another page svelte#3165, which there's no (permanent) fix for without leaving the code bundle vulnerable to hacking.

How can this be solved?

Put something that would:

  • inform the app developer(s) to make sure that they are not using precompiled UI components, and
  • inform the component developer(s) to have precompiled components ready to be used by their dependents/consumers.
  • Precompiled components should only be compiled when/while testing the package itself.

somewhere prominently visible in the docs.

Why would this be beneficial, and who would benefit from this solution?

In those issues mentioned above, they both discuss about consuming third-party component libraries; issue A discusses more general components such as a UI library, and issue B deals with branching components/blocks (e.g. #if, #await, and routers/carousels, and possibly iteration/#each blocks, which are used in almost every Svelte library you can think of). These alone could hinder the practicality and extensibility/modularity of the framework. With the aforementioned information, component devs are aware of how they they ship their components, and make it easier for app devs to import and use an external component without having to worry if their app will break or not (lots of devs are tired of looking at nasty error logs btw).

@Conduitry
Copy link
Member

To:

@IRod22

What needs discussing?

Don't @ maintainers in issues.

@ghost
Copy link
Author

ghost commented Jun 7, 2022

@Conduitry got it. Thx

@bluwy bluwy added the documentation Improvements or additions to documentation label Jun 8, 2022
@jindrahm
Copy link

I got another issue..
(C) onMount not called with dynamic import

@jindrahm
Copy link

What about adding to the documentation the info that if you want to use a pre-bundled svelte component in another svelte component you need to have the svelte internals shared? Or is it still an unsupported way?

@benmccann
Copy link
Member

this is a pretty old issue, so I'm going to go ahead and close it as we now have @sveltejs/package, which aims to address these types of issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants