@alpinejs/docs 3.14.0-revision.1 → 3.14.1-revision.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpinejs/docs",
3
- "version": "3.14.0-revision.1",
3
+ "version": "3.14.1-revision.1",
4
4
  "description": "The documentation for Alpine",
5
5
  "author": "Caleb Porzio",
6
6
  "license": "MIT"
@@ -118,3 +118,26 @@ Alpine.data('counter', () => ({
118
118
  },
119
119
  }))
120
120
  ```
121
+
122
+ The CSP build supports accessing nested properties (property accessors) using the dot notation.
123
+
124
+ ```alpine
125
+ <!-- This works too -->
126
+ <div x-data="counter">
127
+ <button @click="foo.increment">Increment</button>
128
+
129
+ <span x-text="foo.count"></span>
130
+ </div>
131
+ ```
132
+
133
+ ```js
134
+ Alpine.data('counter', () => ({
135
+ foo: {
136
+ count: 1,
137
+
138
+ increment() {
139
+ this.count++
140
+ },
141
+ },
142
+ }))
143
+ ```
@@ -51,7 +51,7 @@ You may also pass objects to `x-for`.
51
51
 
52
52
  There are two rules worth noting about `x-for`:
53
53
 
54
- >`x-for` MUST be declared on a `<template>` element
54
+ >`x-for` MUST be declared on a `<template>` element.
55
55
  > That `<template>` element MUST contain only one root element
56
56
 
57
57
  <a name="keys"></a>
@@ -33,7 +33,7 @@ This is by far the simplest way to get started with Alpine. Include the followin
33
33
  Notice the `@3.x.x` in the provided CDN link. This will pull the latest version of Alpine version 3. For stability in production, it's recommended that you hardcode the latest version in the CDN link.
34
34
 
35
35
  ```alpine
36
- <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.0/dist/cdn.min.js"></script>
36
+ <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.1/dist/cdn.min.js"></script>
37
37
  ```
38
38
 
39
39
  That's it! Alpine is now available for use inside your page.