vaderjs 1.2.0 → 1.2.2
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 +1 -1
- package/readme.md +7 -6
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -47,7 +47,7 @@ or
|
|
|
47
47
|
- Then you can import like this
|
|
48
48
|
|
|
49
49
|
```js
|
|
50
|
-
import
|
|
50
|
+
import Vader, { VaderRouter, include } from 'vaderjs'
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
3. Use VaderJS features for routing, state management, auth, and more.
|
|
@@ -65,7 +65,7 @@ or
|
|
|
65
65
|
### Declarative Routing
|
|
66
66
|
|
|
67
67
|
```javascript
|
|
68
|
-
import { VaderRouter
|
|
68
|
+
import { VaderRouter } from 'vaderjs'
|
|
69
69
|
import { MyComponent } from './components/my-component.js'
|
|
70
70
|
const app = new VaderRouter('/') // intial route
|
|
71
71
|
|
|
@@ -89,7 +89,7 @@ app.start()
|
|
|
89
89
|
### State Management
|
|
90
90
|
|
|
91
91
|
```javascript
|
|
92
|
-
import
|
|
92
|
+
import Vader from "vaderjs"
|
|
93
93
|
|
|
94
94
|
class MyApp extends Vader.Component{
|
|
95
95
|
contructor(){
|
|
@@ -158,11 +158,12 @@ window.addEventListener('signalDispatch', (e)=>{
|
|
|
158
158
|
### Function Binding
|
|
159
159
|
|
|
160
160
|
```javascript
|
|
161
|
+
|
|
161
162
|
const fn = this.$Function(function fn() {
|
|
162
163
|
console.log("Hello World");
|
|
163
164
|
});
|
|
164
165
|
|
|
165
|
-
return html`<button onclick="${fn}">Click Me</button>`
|
|
166
|
+
return html(`<button onclick="${fn}">Click Me</button>`)
|
|
166
167
|
```
|
|
167
168
|
|
|
168
169
|
### Authentication & Authorization
|
|
@@ -181,7 +182,7 @@ if (auth.can('edit')) {
|
|
|
181
182
|
### Simplified Component Creation
|
|
182
183
|
|
|
183
184
|
```javascript
|
|
184
|
-
import
|
|
185
|
+
import Vader from 'vaderjs';
|
|
185
186
|
|
|
186
187
|
export class App extends Vader.Component{
|
|
187
188
|
constructor(){
|
|
@@ -209,7 +210,7 @@ ${
|
|
|
209
210
|
|
|
210
211
|
```js
|
|
211
212
|
// home.js
|
|
212
|
-
import
|
|
213
|
+
import Vader from "vaderjs";
|
|
213
214
|
|
|
214
215
|
class Home extends Vader.Component {
|
|
215
216
|
constructor() {
|