We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77fcfe0 commit 2c34bdeCopy full SHA for 2c34bde
src/react/hooks.ts
@@ -254,11 +254,11 @@ export function useActionEffect(configId: string, effect: () => void) {
254
*/
255
export function usePluginStyle(): PluginStyle | undefined {
256
const client = usePlugin();
257
- const [style, setStyle] = useState<PluginStyle | undefined>(undefined);
+ const [style, setStyle] = useState<PluginStyle | undefined>();
258
259
useEffect(() => {
260
// Request initial style data on mount and subscribe to updates
261
- void client.style.getStyle().then(setStyle);
+ void client.style.getStyle().then(response => setStyle(response));
262
return client.style.subscribeToStyle(setStyle);
263
}, [client]);
264
0 commit comments