Skip to content

Commit

Permalink
chore(_official-realtime-app,sse-chat,sse-counter): upgrade `remix-ut…
Browse files Browse the repository at this point in the history
…ils` (#126)
  • Loading branch information
sergiodxa committed Jan 13, 2023
1 parent a86673d commit 11377aa
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 24 deletions.
9 changes: 4 additions & 5 deletions _official-realtime-app/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import {
Outlet,
Scripts,
ScrollRestoration,
useRevalidator,
} from "@remix-run/react";
import { useEffect } from "react";
import { useEventSource } from "remix-utils";

import { useRevalidator } from "~/use-revalidator";

import icons from "./icons.svg";
import styles from "./styles.processed.css";

Expand Down Expand Up @@ -44,8 +43,8 @@ export default function App() {

function useRealtimeIssuesRevalidation() {
const data = useEventSource("/issues-events");
const revalidator = useRevalidator();
const { revalidate } = useRevalidator();
useEffect(() => {
revalidator.revalidate();
}, [data, revalidator]);
revalidate();
}, [data, revalidate]);
}
7 changes: 0 additions & 7 deletions _official-realtime-app/app/routes/dev.null.ts

This file was deleted.

9 changes: 0 additions & 9 deletions _official-realtime-app/app/use-revalidator.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion _official-realtime-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"isbot": "^3.6.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"remix-utils": "^4.2.1",
"remix-utils": "^6.0.0",
"tiny-invariant": "^1.3.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion sse-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"isbot": "^3.6.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"remix-utils": "^5.1.0"
"remix-utils": "^6.0.0"
},
"devDependencies": {
"@remix-run/dev": "*",
Expand Down
2 changes: 1 addition & 1 deletion sse-counter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"isbot": "^3.6.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"remix-utils": "^5.1.0"
"remix-utils": "^6.0.0"
},
"devDependencies": {
"@remix-run/dev": "*",
Expand Down

0 comments on commit 11377aa

Please sign in to comment.