Skip to content

chore(alm): update counter example to 1.8.0 #2076

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

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
3 changes: 1 addition & 2 deletions examples/action-listener/counter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"@reduxjs/toolkit": "^1.6.0-rc.1",
"@rtk-incubator/action-listener-middleware": "^0.8.0",
"@reduxjs/toolkit": "^1.8.0-rc.0",
"@types/node": "^12.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
Expand Down
3 changes: 1 addition & 2 deletions examples/action-listener/counter/src/components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { CounterList } from '../CounterList/CounterList'
import { CreateCounterForm } from '../CreateCounterForm/CreateCounterForm'
import { store, startAppListening } from '../../store'


export function App() {
useEffect(() => {
const subscriptions: Unsubscribe[] = [
Expand All @@ -32,5 +31,5 @@ export function App() {
</main>
</Provider>
</React.StrictMode>
)
)
}
12 changes: 10 additions & 2 deletions examples/action-listener/counter/src/services/counter/listeners.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { counterActions, counterSelectors } from './slice'
import { AnyAction, isAllOf, isAnyOf, PayloadAction, Unsubscribe } from '@reduxjs/toolkit'
import {
AnyAction,
isAllOf,
isAnyOf,
PayloadAction,
Unsubscribe,
} from '@reduxjs/toolkit'
import type { AppListenerEffectAPI, AppStartListening } from '../../store'

function shouldStopAsyncTasksOf(id: string) {
Expand Down Expand Up @@ -70,7 +76,9 @@ async function onUpdateAsync(
* }, []);
* ```
*/
export function setupCounterListeners(startListening: AppStartListening): Unsubscribe {
export function setupCounterListeners(
startListening: AppStartListening
): Unsubscribe {
const subscriptions = [
startListening({
actionCreator: counterActions.updateByPeriodically,
Expand Down
6 changes: 3 additions & 3 deletions examples/action-listener/counter/src/store.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux'
import { configureStore } from '@reduxjs/toolkit'
import { counterSlice } from './services/counter/slice'
import {
configureStore,
createListenerMiddleware,
TypedStartListening,
TypedAddListener,
ListenerEffectAPI,
addListener,
} from '@rtk-incubator/action-listener-middleware'
} from '@reduxjs/toolkit'
import { counterSlice } from './services/counter/slice'
import { themeSlice } from './services/theme/slice'

const listenerMiddlewareInstance = createListenerMiddleware({
Expand Down
54 changes: 22 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3672,8 +3672,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@examples-action-listener/counter@workspace:examples/action-listener/counter"
dependencies:
"@reduxjs/toolkit": ^1.6.0-rc.1
"@rtk-incubator/action-listener-middleware": ^0.8.0
"@reduxjs/toolkit": ^1.8.0-rc.0
"@types/node": ^12.0.0
"@types/react": ^17.0.0
"@types/react-dom": ^17.0.0
Expand Down Expand Up @@ -5332,27 +5331,7 @@ __metadata:
languageName: node
linkType: hard

"@reduxjs/toolkit@npm:^1.6.0, @reduxjs/toolkit@npm:^1.6.0-rc.1":
version: 1.7.2
resolution: "@reduxjs/toolkit@npm:1.7.2"
dependencies:
immer: ^9.0.7
redux: ^4.1.2
redux-thunk: ^2.4.1
reselect: ^4.1.5
peerDependencies:
react: ^16.9.0 || ^17.0.0 || 18.0.0-beta
react-redux: ^7.2.1 || ^8.0.0-beta
peerDependenciesMeta:
react:
optional: true
react-redux:
optional: true
checksum: 41c17c660f7c95d776658b9a101f9803c37589b2c08861e90283abe5fab70f99c37af064fae0c5b7501f67308946fa072504f6a801e272f157b9f7427a5e571e
languageName: node
linkType: hard

"@reduxjs/toolkit@workspace:packages/toolkit":
"@reduxjs/toolkit@^1.8.0-rc.0, @reduxjs/toolkit@workspace:packages/toolkit":
version: 0.0.0-use.local
resolution: "@reduxjs/toolkit@workspace:packages/toolkit"
dependencies:
Expand Down Expand Up @@ -5421,6 +5400,26 @@ __metadata:
languageName: unknown
linkType: soft

"@reduxjs/toolkit@npm:^1.6.0, @reduxjs/toolkit@npm:^1.6.0-rc.1":
version: 1.7.2
resolution: "@reduxjs/toolkit@npm:1.7.2"
dependencies:
immer: ^9.0.7
redux: ^4.1.2
redux-thunk: ^2.4.1
reselect: ^4.1.5
peerDependencies:
react: ^16.9.0 || ^17.0.0 || 18.0.0-beta
react-redux: ^7.2.1 || ^8.0.0-beta
peerDependenciesMeta:
react:
optional: true
react-redux:
optional: true
checksum: 41c17c660f7c95d776658b9a101f9803c37589b2c08861e90283abe5fab70f99c37af064fae0c5b7501f67308946fa072504f6a801e272f157b9f7427a5e571e
languageName: node
linkType: hard

"@rollup/plugin-alias@npm:^3.1.1":
version: 3.1.2
resolution: "@rollup/plugin-alias@npm:3.1.2"
Expand Down Expand Up @@ -5533,15 +5532,6 @@ __metadata:
languageName: node
linkType: hard

"@rtk-incubator/action-listener-middleware@npm:^0.8.0":
version: 0.8.0
resolution: "@rtk-incubator/action-listener-middleware@npm:0.8.0"
peerDependencies:
"@reduxjs/toolkit": ^1.6.0
checksum: 2e9c0a235758bf2e7915c708ad641a7d3c25b0f7b0da787dca0fbdf73b0f530f3e9923f251232d1650c847e3447e96377ac592d5b167b7b63f216dccbb7c4d61
languageName: node
linkType: hard

"@rtk-query/codegen-openapi@workspace:packages/rtk-query-codegen-openapi":
version: 0.0.0-use.local
resolution: "@rtk-query/codegen-openapi@workspace:packages/rtk-query-codegen-openapi"
Expand Down