Skip to content

Commit 33c74b3

Browse files
Merge pull request #6 from Statflo/STATFLO-800
feat(STATFLO-800): fix zustand warnings
2 parents 2d21a16 + c795662 commit 33c74b3

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import useWidgetStore from "@statflo/widget-sdk";
2323

2424
```typescript
2525
import useWidgetStore from "@statflo/widget-sdk";
26-
import create from "zustand";
26+
import { create } from "zustand";
2727

2828
const useBoundWidgetStore = create(useWidgetStore);
2929
```

examples/react/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useEffect, useState } from "react";
22
import "iframe-resizer-react";
3-
import create from "zustand";
3+
import { create } from "zustand";
44
import "./App.css";
55

66
import useWidgetStore, { WidgetEvent } from "@statflo/widget-sdk";

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@statflo/widget-sdk",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"description": "SDK for building widgets with Statflo and beyond",
55
"main": "./dist/index.js",
66
"module": "./dist/index.js",

src/store.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { v4 as uuidv4 } from "uuid";
2-
import create from "zustand/vanilla";
2+
import { createStore } from "zustand/vanilla";
33
import "iframe-resizer/js/iframeResizer.contentWindow";
44

55
export interface Widget {
@@ -37,7 +37,7 @@ export class WidgetEvent<T> {
3737
}
3838
}
3939

40-
const useWidgetStore = create<WidgetState>()((set, get) => {
40+
const useWidgetStore = createStore<WidgetState>()((set, get) => {
4141
const listener = (event: MessageEvent) => {
4242
const { data } = event;
4343

0 commit comments

Comments
 (0)