Skip to content

Commit ccfd1da

Browse files
Katarina Antonkaciakmaciak
authored andcommitted
docs(examples): add firebase example
resolves #47
1 parent 445b853 commit ccfd1da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+6162
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ yarn add react-query-subscription react react-query@3 rxjs@7
4444

4545
## Use cases
4646

47+
Please see [examples](./examples/README.md).
48+
4749
### Subscribe to WebSocket
4850

4951
TODO

examples/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Examples
2+
3+
## `useInfiniteSubscription`
4+
5+
The following examples are using `useInfiniteSubscription` hook in combination
6+
with other hooks - `useSubscription`, `useQuery` and/or `useMutation`.
7+
8+
| Example | App description | Libraries used | Source code |
9+
| -------- | ------------------ | -------------------- | -------------------------- |
10+
| Firebase | Basic chatting app | `firebase`, `rxfire` | [Source code](./firebase/) |

examples/firebase/.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["plugin:react/jsx-runtime"]
3+
}

examples/firebase/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

examples/firebase/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>react-query-subscription Firebase example</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)