Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/shiny-symbols-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"next-ws": patch
---

Mark client context as deprecated
2 changes: 2 additions & 0 deletions src/client/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const WebSocketConsumer = WebSocketContext.Consumer;
* allowing for easy access to the WebSocket from anywhere in the app.
* @param props WebSocket parameters and children.
* @returns JSX Element
* @deprecated `WebSocketProvider` is deprecated, use your own implementation instead.
*/
export function WebSocketProvider(
p: React.PropsWithChildren<{
Expand Down Expand Up @@ -53,6 +54,7 @@ export function WebSocketProvider(
/**
* Access the websocket from anywhere in the app, so long as it's wrapped in a WebSocketProvider.
* @returns WebSocket client when connected, null when disconnected.
* @deprecated `useWebSocket` is deprecated, use your own implementation instead.
*/
export function useWebSocket() {
const context = useContext(WebSocketContext);
Expand Down