Skip to content

Commit

Permalink
Updatare readme
Browse files Browse the repository at this point in the history
  • Loading branch information
croxton committed Dec 4, 2023
1 parent 2378015 commit 957ec68
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,6 @@ Retrieve state from the specified scope, optionally passing an object with a set
let currentState = this.getState('component', { a: null, b:null });
```

```html
<div id="my-thing-1" data-booster="myThing" data-options='{"message":"Hello!"}'></div>
```

#### stateChange(changes)
Called by the `setState` method, with any changes to state passed as an object and intended to be overridden in your class. This can optionally be used to perform all DOM manipulation within a single function. Note that this can only be used with state changes in the `local` scope.

Expand All @@ -242,6 +238,13 @@ this.destroyState('component');

### Example class


#### html
```html
<div id="my-thing-1" data-booster="myThing" data-options='{"message":"Hello!"}'></div>
```

#### js
```js
export default class MyThing extends Booster {

Expand Down

0 comments on commit 957ec68

Please sign in to comment.