stencil-site icon indicating copy to clipboard operation
stencil-site copied to clipboard

Improvement: documentation of patterns/antipatterns

Open igorlino opened this issue 4 years ago • 4 comments

Stencil version: @stencil/[email protected]

I'm submitting a:

[ ] bug report [x] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior: Not necessarely clear what is an anti-pattern and what is a pattern

Expected behavior: Easy doc to understand/reuse good patterns. Easy doc to understand and avoid unwanted anti-patterns

Steps to reproduce: Read https://stenciljs.com/docs/style-guide

Related code:

Other information:

I was reading in InfoQ the article GitHub's Journey with Web Standards and Web Components

And was wondering 2 things, why they did not consider Stencil ? Why did they have to do it themselves.

And then also reading their documentation I found 2 interesting parts https://github.github.io/catalyst/guide/anti-patterns/ https://github.github.io/catalyst/guide/patterns/

I think documentation of such patterns/anti-patterns could have great benefit for the adoption of Stencil. I imagine from those one could create VisualStudioCode snippet pluggins to speed up even more.

igorlino avatar May 15 '21 12:05 igorlino

why they did not consider Stencil ?

@igorlino This is a very good question. Did you find an answer? I couldn't find anything from the links provided.

markcellus avatar May 15 '21 18:05 markcellus

Using rails, i think they probably just wanted something that didn’t require node for ssr. With catalyst they return as much as possible in light dom rendered by the server, then a component enhances it on the client.

johnjenkins avatar May 15 '21 23:05 johnjenkins

Even better than having to read docs, Stencil provides an eslint plugin with the recommended patterns for working with the library https://github.com/ionic-team/stencil-eslint

That package is sorely outdated, though, so it can't be used directly right now.

adrm avatar Jun 08 '21 07:06 adrm

This is a great point, and something that's been on the team's mind for the past few weeks. I'm going to move this to the Stencil site repo, which is where the documentation for the project lives. Thanks again!

rwaskiewicz avatar Sep 07 '21 18:09 rwaskiewicz