diff --git a/README.md b/README.md
index 6188757..2cd144d 100644
--- a/README.md
+++ b/README.md
@@ -10,13 +10,11 @@ Custom hooks to help use overwolf api with the new react hooks technology.
## Install
```bash
-npm install --save overwolf-hooks
-pnpm install --save overwolf-hooks
-yarn add overwolf-hooks
+$ npm install --save overwolf-hooks
+$ pnpm install --save overwolf-hooks
+$ yarn add overwolf-hooks
```
-````
-
## How to use
- If you are not familiar with Overwolf [overwolf api](https://overwolf.github.io/)
@@ -46,37 +44,39 @@ return (
)
}
-
+```
## Force Window update
If you need to force update the window state, you can use the refreshState function.
```tsx
-import { useWindow } from 'overwolf-hooks'
+import { useWindow } from "overwolf-hooks";
const shouldDisplayLog = true;
const shouldListenToWindowStateChanges = true;
-const Panel = () => {
-
//listenToWindowStateChanges is set to true to listen to window state changes, so you can read the window state from the desktopWindowStateChanged variable
-const [desktopWindow, desktopWindowStateChanged, refreshState] = useWindow("desktop", shouldDisplayLog, shouldListenToWindowStateChanges);
-
-useEffect(() => {
- //........ any other code
- //force update/rebind the window object
- refreshState();
-}, [refreshState]);
+const [desktopWindow, desktopWindowStateChanged, refreshState] = useWindow(
+ "desktop",
+ shouldDisplayLog,
+ shouldListenToWindowStateChanges
+);
-useEffect(() => {
- //........ any other code
- console.info("desktopWindowStateChanged", desktopWindowStateChanged);
-}, [desktopWindowStateChanged]);
+const Panel = () => {
+ useEffect(() => {
+ //........ any other code
+ //force update/rebind the window object
+ refreshState();
+ }, [refreshState]);
-return
Alert Window
## License MIT © [AlbericoD](https://github.com/AlbericoD) - -````