@superblocksteam/custom-components 0.0.20 → 0.0.22
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 +2 -2
- package/dist/useSuperblocksContext.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ export default function Component({
|
|
|
14
14
|
count,
|
|
15
15
|
}: Props) {
|
|
16
16
|
const {
|
|
17
|
-
|
|
17
|
+
updateProperties,
|
|
18
18
|
events: {
|
|
19
19
|
onChange,
|
|
20
20
|
},
|
|
@@ -23,7 +23,7 @@ export default function Component({
|
|
|
23
23
|
return (
|
|
24
24
|
<button
|
|
25
25
|
onClick={() => {
|
|
26
|
-
|
|
26
|
+
updateProperties({ count: count + 1 });
|
|
27
27
|
onChange();
|
|
28
28
|
}}
|
|
29
29
|
>Increment</button>
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface SuperblocksContext<Props, EventTriggers> {
|
|
5
5
|
/**
|
|
6
|
-
* Update one (or more) of your component's
|
|
6
|
+
* Update one (or more) of your component's properties. This will cause the component to rerender,
|
|
7
7
|
* and will also notify any other components in your Application which depend on the updated properties, so they also rerender
|
|
8
8
|
* @param props An object with the properties to update along with their new values
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
updateProperties: (props: Partial<Props>) => void;
|
|
11
11
|
/**
|
|
12
12
|
* An object that contains methods that can be used to trigger events in Superblocks from your component.
|
|
13
13
|
*/
|