You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -53,26 +55,26 @@ This minimalist example implement the iconic "counter button" component with Sup
53
55
54
56
- Unlike in SolidJS, one must return a function instead of JSX directly from a component
55
57
- The signal shall not be called to avoid re-rendering the full button and only mutate the count value in the DOM when it is changed
56
-
-`h` (and `Fragment`) functions must be in scope to be able to use JSX (respectively `<>...</>`)
58
+
-When working with JSX markup, `jsxImportSource`must be set in TypeScript config to `supplejs`to import primitives necessary for supplejs and typing of JSX
57
59
58
60
This all is due to not having a compiler, and to the design of SuppleJS. However, besides that, the same API is used as SolidJS. For example for `createSignal`, `render` and other reactive primitives like `createMemo`, `createResource`, `createEffect`, `onCleanup`, `createRoot`, `getOwner`, and so on. SuppleJS also provides same control flow components as Solid: `<Show>`, `<Switch>`/`<Match>`, `<For>`, `<Index>`, `<Portal>`, etc.
59
61
60
62
As SuppleJS provides the same API and design as Solid, you can have a look at the [Github repository](https://github.com/solidjs/solid) and the [API documentation](https://www.solidjs.com/docs/latest/api) to get a glimpse of what's inside SuppleJS and what are its key features. Bear in mind though that SuppleJS is only about the front-end rendering part and has no Server Side Rendering engine.
61
63
62
64
## How to use?
63
65
64
-
The usual steps as for many other JavaScript project is to clone the project in your computer and install dependencies from npm. The project uses [pnpm](https://pnpm.io/fr/) package manager and [vite](https://vitejs.dev/) developer tooling.
66
+
You can get started with a simple app by running the commands below in your terminal. The project uses [pnpm](https://pnpm.io/fr/) package manager and [vite](https://vitejs.dev/) developer tooling.
Once all dependencies are downloaded and installed, you can run a local server with fast refresh with:
73
75
74
76
```sh
75
-
> pnpm dev
77
+
> pnpm run dev# or yarn or npm
76
78
```
77
79
78
80
Other scripts includes:
@@ -83,3 +85,15 @@ Other scripts includes:
83
85
> pnpm build && pnpm preview # build supple & run a preview server
84
86
> pnpm lint # launch eslint
85
87
```
88
+
89
+
**Note:** Even though SuppleJS is working mostly fine and have a good ecosystem, it is still just a educational project. As such, it should not be used for production-grade development!
90
+
91
+
## Contributing
92
+
93
+
As SuppleJS is just a toy project, I probably won't be accepting pull requests or contributions.
94
+
95
+
However, do feel free to fork the project to use it for you own education or to do whatever you feel like to do with it.
96
+
97
+
If you find issues or have feedbacks to do, don't hesitate to create an issue.
98
+
99
+
I'm using supplejs & supplejs-testing-library package names in [npm](https://www.npmjs.com/). If feel you need this library name and have good reasons not to use another, file an issue to reach out to me!
0 commit comments