Releases: bholmesdev/simple-stack
Releases · bholmesdev/simple-stack
[email protected]
Minor Changes
-
#77
f1431d5
Thanks @bholmesdev! - Revamps APIs to fix bugs and unlock a new suite of features.<RootElement> <button data-target="btn">Click me</button> </RootElement> <script> RootElement.ready(($) => { $('btn').addEventListener('click', () => { console.log("It's like JQuery but not!"); }); }); </script>
- Support multiple instances of the same component. Before, only the first instance would become interactive.
- Enable data passing from the server to your client script using the
data
property. - Add an
effect()
utility to interact with the Signal polyfill for state management.
Visit revamped documentation page to learn how to use the new features.
Migration for v0.1
If you were an early adopter of v0.1, thank you! You'll a few small updates to use the new APIs:
- Wrap any HTML you want to target with the global
RootElement
component. - Remove the
$
wrapper from yourdata-target
selector (data-target={$('btn')}
->data-target="btn"
). Scoping is now handled automatically. - Change
$.ready()
toRootElement.ready()
, and retrieve the$
selector from the first function argument. The$
selector is no longer a global.
+ <RootElement> - <button data=target={$('btn')}> + <button data-target="btn"> Click me </button> + </RootElement> <script> - $.ready(() => { + RootElement.ready(($) => { $('btn').addEventListener('click', () => { console.log("It's like JQuery but not!"); }); }); </script>
Since the syntax for
data-target
is now simpler, we have also removed the VS Code snippets prompt. We recommend deleting the snippets file created by v0.1:.vscode/simple-query.code-snippets
.
[email protected]
Patch Changes
- #75
56a4000
Thanks @bholmesdev! - fixes issue where$.ready
does not fire in Safari or Firefox when using Astro view transitions withfallback="none"
[email protected]
Minor Changes
- #72
72e2630
Thanks @bholmesdev! - Change from a globalready()
block from client scripts to a namespaced$.ready()
block. Should be safer to avoid collisions with any local variables calledready
.
Patch Changes
- #74
20f1ab9
Thanks @bholmesdev! - Add CLI prompt to add VS Code snippets in development.
[email protected]
Patch Changes
- #70
7ff6c6d
Thanks @bholmesdev! - fixes "failed to resolve entry" error on dev server start.
[email protected]
Patch Changes
- Updated dependencies [
7ff6c6d
]:
[email protected]
Patch Changes
- #22
b645806
Thanks @aarongarciah! - Fix simple-stream integration name
[email protected]
Patch Changes
- #20
a36d92d
Thanks @bholmesdev! - Simple stream initial release. Who said suspense had to be hard?
[email protected]
Patch Changes
- #18
86034e4
Thanks @bholmesdev! - Fix accidental form submission on client validation errors