@manyducks.co/dolla 2.0.0-alpha.6 → 2.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -7
- package/dist/index.js +139 -135
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.js +2 -2
- package/dist/jsx-runtime.js +2 -2
- package/dist/markup.d.ts +8 -0
- package/dist/nodes/html.d.ts +1 -1
- package/dist/{passthrough-CW8Ezjg-.js → passthrough-9kwwjgWk.js} +322 -287
- package/dist/passthrough-9kwwjgWk.js.map +1 -0
- package/dist/view.d.ts +16 -1
- package/notes/context-vars.md +21 -0
- package/notes/route-middleware.md +42 -0
- package/notes/scratch.md +37 -0
- package/package.json +1 -1
- package/dist/passthrough-CW8Ezjg-.js.map +0 -1
package/README.md
CHANGED
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|

|
|
4
4
|

|
|
5
5
|
|
|
6
|
-
> WARNING: This package is in active development. It may contain serious bugs and
|
|
6
|
+
> WARNING: This package is in active development. It may contain serious bugs and docs may be outdated or inaccurate. Use at your own risk.
|
|
7
7
|
|
|
8
8
|
Dolla is a batteries-included JavaScript frontend framework covering the needs of moderate-to-complex single page apps:
|
|
9
9
|
|
|
10
|
-
- ⚡ Reactive DOM updates with [State]().
|
|
10
|
+
- ⚡ Reactive DOM updates with [State](). Inspired by Signals, but with more explicit tracking.
|
|
11
11
|
- 📦 Reusable components with [Views](#section-views).
|
|
12
|
-
-
|
|
13
|
-
- Built in [HTTP]() client with middleware support.
|
|
14
|
-
- Built in [
|
|
12
|
+
- 🔀 Built in [routing]() with nested routes and middleware support (check login status, preload data, etc).
|
|
13
|
+
- 🐕 Built in [HTTP]() client with middleware support (set auth headers, etc).
|
|
14
|
+
- 📍 Built in [localization]() system (store translated strings in JSON files and call the `t` function to get them).
|
|
15
|
+
- 🍳 Build system optional. Write views in JSX or use `html` tagged template literals.
|
|
15
16
|
|
|
16
17
|
Let's first get into some examples.
|
|
17
18
|
|
|
@@ -104,10 +105,10 @@ $value.get(); // 50
|
|
|
104
105
|
A basic view:
|
|
105
106
|
|
|
106
107
|
```js
|
|
107
|
-
import Dolla, { html } from "@manyducks.co/dolla";
|
|
108
|
+
import Dolla, { createState, html } from "@manyducks.co/dolla";
|
|
108
109
|
|
|
109
110
|
function Counter(props, ctx) {
|
|
110
|
-
const [$count, setCount] =
|
|
111
|
+
const [$count, setCount] = createState(0);
|
|
111
112
|
|
|
112
113
|
function increment() {
|
|
113
114
|
setCount((count) => count + 1);
|