Skip to content

Commit c905c05

Browse files
authored
wrap showUsersPage() in action() so it works w/ parallel()
showUsersPage() is part of a `parallel()` operator pipeline so needs to be wrapped in an `action()` operator incidentally I created a codesandbox demo of for the routing tutorial. here is the bug in action: https://codesandbox.io/s/mzmq42wjq9 here is the fix: https://codesandbox.io/s/github/100ideas/overmind-routing-demo
1 parent b689796 commit c905c05

File tree

1 file changed

+2
-2
lines changed
  • packages/overmind-website/examples/guide/routing

1 file changed

+2
-2
lines changed

packages/overmind-website/examples/guide/routing/tab.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ export const showHomePage = ({ state }) => {
5252
state.currentPage = 'home'
5353
}
5454
55-
export const showUsersPage = async ({ value: params, state, effects }) => {
55+
export const showUsersPage = action( async ({ value: params, state, effects }) => {
5656
if (!params.id) state.modalUser = null
5757
5858
state.currentPage = 'users'
5959
state.isLoadingUsers = true
6060
state.users = await effects.api.getUsers()
6161
state.isLoadingUsers = false
62-
}
62+
})
6363
6464
export const showUserModal = parallel(
6565
showUsersPage,

0 commit comments

Comments
 (0)