Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(_official-realtime-app,sse-chat,sse-counter): upgrade remix-utils #126

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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