├── .all-contributorsrc ├── .github └── workflows │ └── CI.yml ├── .gitignore ├── .husky ├── .gitignore └── pre-commit ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── assets ├── logo-128.png ├── logo-256.png ├── logo-48.png └── logo-64.png ├── package-lock.json ├── package.json ├── packages ├── core │ ├── README.md │ ├── babel.config.js │ ├── cjsBuild.js │ ├── dist │ │ ├── index.cjs │ │ └── index.js │ ├── package.json │ ├── src │ │ ├── Subscribe.test.tsx │ │ ├── Subscribe.tsx │ │ ├── bind │ │ │ ├── connectFactoryObservable.test.tsx │ │ │ ├── connectFactoryObservable.ts │ │ │ ├── connectObservable.test.tsx │ │ │ ├── connectObservable.ts │ │ │ └── index.ts │ │ ├── index.tsx │ │ ├── internal │ │ │ ├── empty-value.ts │ │ │ ├── useSyncExternalStore.ts │ │ │ └── useSyncExternalStoreCjs.ts │ │ ├── shareLatest.test.ts │ │ ├── shareLatest.ts │ │ ├── stateJsx.test.tsx │ │ ├── stateJsx.tsx │ │ ├── test-helpers │ │ │ ├── TestErrorBoundary.tsx │ │ │ └── pipeableStreamToObservable.ts │ │ └── useStateObservable.ts │ ├── tsconfig-build.json │ └── tsconfig.json ├── dom │ ├── README.md │ ├── dist │ │ ├── index.cjs │ │ └── index.js │ ├── package.json │ ├── src │ │ ├── batchUpdates.test.tsx │ │ ├── batchUpdates.ts │ │ └── index.tsx │ ├── tsconfig-build.json │ └── tsconfig.json └── utils │ ├── README.md │ ├── dist │ ├── index.cjs │ └── index.js │ ├── package.json │ ├── src │ ├── combineKeys.test.ts │ ├── combineKeys.ts │ ├── contextBinder.test.tsx │ ├── contextBinder.ts │ ├── createKeyedSignal.spec.ts │ ├── createKeyedSignal.ts │ ├── createListener.ts │ ├── createSignal.spec.ts │ ├── createSignal.ts │ ├── index.tsx │ ├── internal-utils.ts │ ├── mergeWithKey.spec.ts │ ├── mergeWithKey.ts │ ├── partitionByKey.test.ts │ ├── partitionByKey.ts │ ├── selfDependent.test.ts │ ├── selfDependent.ts │ ├── suspend.test.ts │ ├── suspend.ts │ ├── suspended.test.ts │ ├── suspended.ts │ ├── switchMapSuspended.test.ts │ ├── switchMapSuspended.ts │ ├── toKeySet.test.ts │ └── toKeySet.ts │ ├── tsconfig-build.json │ └── tsconfig.json └── vitest.config.ts /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "README.md" 4 | ], 5 | "imageSize": 100, 6 | "commit": false, 7 | "contributors": [ 8 | { 9 | "login": "josepot", 10 | "name": "Josep M Sobrepere", 11 | "avatar_url": "https://avatars1.githubusercontent.com/u/8620144?v=4", 12 | "profile": "https://github.com/josepot", 13 | "contributions": [ 14 | "code", 15 | "ideas", 16 | "maintenance", 17 | "test", 18 | "review", 19 | "doc", 20 | "infra" 21 | ] 22 | }, 23 | { 24 | "login": "voliva", 25 | "name": "Víctor Oliva", 26 | "avatar_url": "https://avatars2.githubusercontent.com/u/5365487?v=4", 27 | "profile": "https://github.com/voliva", 28 | "contributions": [ 29 | "ideas", 30 | "review", 31 | "code", 32 | "test", 33 | "doc" 34 | ] 35 | }, 36 | { 37 | "login": "clayforthcarr", 38 | "name": "Ed", 39 | "avatar_url": "https://avatars3.githubusercontent.com/u/6012083?v=4", 40 | "profile": "http://www.clayforthcarr.com", 41 | "contributions": [ 42 | "design" 43 | ] 44 | }, 45 | { 46 | "login": "pgrimaud", 47 | "name": "Pierre Grimaud", 48 | "avatar_url": "https://avatars1.githubusercontent.com/u/1866496?v=4", 49 | "profile": "https://github.com/pgrimaud", 50 | "contributions": [ 51 | "doc" 52 | ] 53 | }, 54 | { 55 | "login": "bhavesh-desai-scratch", 56 | "name": "Bhavesh Desai", 57 | "avatar_url": "https://avatars3.githubusercontent.com/u/15194540?v=4", 58 | "profile": "https://github.com/bhavesh-desai-scratch", 59 | "contributions": [ 60 | "review", 61 | "doc", 62 | "test" 63 | ] 64 | }, 65 | { 66 | "login": "mattmischuk", 67 | "name": "Matt Mischuk", 68 | "avatar_url": "https://avatars1.githubusercontent.com/u/3485831?v=4", 69 | "profile": "https://m1x.io", 70 | "contributions": [ 71 | "doc" 72 | ] 73 | }, 74 | { 75 | "login": "rikoe", 76 | "name": "Riko Eksteen", 77 | "avatar_url": "https://avatars1.githubusercontent.com/u/3295115?v=4", 78 | "profile": "https://github.com/rikoe", 79 | "contributions": [ 80 | "infra", 81 | "review", 82 | "doc", 83 | "code", 84 | "ideas" 85 | ] 86 | }, 87 | { 88 | "login": "hoclun-rigsep", 89 | "name": "hoclun-rigsep", 90 | "avatar_url": "https://avatars.githubusercontent.com/u/20741358?v=4", 91 | "profile": "https://github.com/hoclun-rigsep", 92 | "contributions": [ 93 | "doc", 94 | "ideas" 95 | ] 96 | }, 97 | { 98 | "login": "skve", 99 | "name": "Luke Shiels", 100 | "avatar_url": "https://avatars.githubusercontent.com/u/47612057?v=4", 101 | "profile": "https://github.com/skve", 102 | "contributions": [ 103 | "bug", 104 | "code" 105 | ] 106 | }, 107 | { 108 | "login": "rveciana", 109 | "name": "Roger Veciana i Rovira", 110 | "avatar_url": "https://avatars.githubusercontent.com/u/2832885?v=4", 111 | "profile": "http://geoexamples.com", 112 | "contributions": [ 113 | "maintenance" 114 | ] 115 | } 116 | ], 117 | "contributorsPerLine": 7, 118 | "projectName": "react-rxjs", 119 | "projectOwner": "re-rxjs", 120 | "repoType": "github", 121 | "repoHost": "https://github.com", 122 | "skipCi": true, 123 | "commitType": "docs", 124 | "commitConvention": "angular" 125 | } 126 | -------------------------------------------------------------------------------- /.github/workflows/CI.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | pull_request: 5 | branches: [main] 6 | push: 7 | branches: [main] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v2 15 | - uses: actions/setup-node@v1 16 | with: 17 | node-version: "16" 18 | - run: npm ci 19 | - run: npm run lint 20 | 21 | - name: Build & Bundlewatch 22 | uses: jackyef/bundlewatch-gh-action@master 23 | env: 24 | CI_BRANCH_BASE: main 25 | with: 26 | build-script: npm run build 27 | bundlewatch-github-token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} 28 | 29 | - name: Tests 30 | run: npm test 31 | 32 | - name: Code Coverage 33 | uses: codecov/codecov-action@v3 34 | with: 35 | files: ./packages/core/coverage/lcov.info,./packages/utils/coverage/lcov.info,./packages/dom/coverage/lcov.info 36 | fail_ci_if_error: true 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | node_modules 4 | coverage 5 | .cache 6 | packages/core/dist/** 7 | !packages/core/dist/index.cjs 8 | !packages/core/dist/index.js 9 | packages/utils/dist/** 10 | !packages/utils/dist/index.cjs 11 | !packages/utils/dist/index.js 12 | packages/dom/dist/** 13 | !packages/dom/dist/index.cjs 14 | !packages/dom/dist/index.js 15 | -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.10.8 (2025-01-14) 2 | 3 | - Update dependencies to support React 19 (#321) 4 | 5 | ## 0.10.7 (2023-08-04) 6 | 7 | - Add getServerSnapshot, fix loop on SSR Subscribe (#306) 8 | 9 | ## 0.10.6 (2023-07-12) 10 | 11 | - fix(webpack build): default condition should be last one (#304) 12 | 13 | ## 0.10.5 (2023-07-11) 14 | 15 | - fix: types not read when moduleResolution is not "node" (#302) 16 | 17 | ### utils@0.9.6 18 | 19 | - fix(selfDependent): prevent subject from being closed after unsubscription (#283) 20 | 21 | ## 0.10.4 (2023-03-11) 22 | 23 | - fix: can't derive a StateObservable with takeUntil 24 | 25 | ## 0.10.3 (2022-09-09) 26 | 27 | - fix: avoid errors on unmounted Suspense components 28 | 29 | ## 0.10.2 (2022-09-09) 30 | 31 | - fix: pipeState also enhanced as a React element (#282) 32 | 33 | ## 0.10.1 (2022-09-09) 34 | 35 | - fix: re-export types correctly from @rx-state/core 36 | 37 | ### utils 38 | 39 | - chore: rename `selfDependant` to `selfDependent` (#272) 40 | 41 | ## 0.10.0 (2022-09-09) 42 | 43 | - StateObservables as JSX Elements. 44 | 45 | StateObservables are now also JSX Elements, which lets you use them directly as children of other components. 46 | 47 | ```tsx 48 | const count$ = state(interval(1000), 0) 49 | 50 | const App = () => { 51 | const count = useStateObservable(count$) 52 | 53 | return
Josep M Sobrepere 💻 🤔 🚧 ⚠️ 👀 📖 🚇 |
41 | Víctor Oliva 🤔 👀 💻 ⚠️ 📖 |
42 | Ed 🎨 |
43 | Pierre Grimaud 📖 |
44 | Bhavesh Desai 👀 📖 ⚠️ |
45 | Matt Mischuk 📖 |
46 | Riko Eksteen 🚇 👀 📖 💻 🤔 |
47 |
hoclun-rigsep 📖 🤔 |
50 | Luke Shiels 🐛 💻 |
51 | Roger Veciana i Rovira 🚧 |
52 |