Open r0xsh opened 4 months ago
we can get rid from some of this boilerplate by using createAsyncThunk from redux toolkit, it will create all these actions internally, see an example here: https://github.com/coopcycle/coopcycle-app/blob/21ba9b6a271e8cde8134dc1b2ca36b07aec45b9a/src/redux/Restaurant/actions.js#L427-L436
createAsyncThunk
_Originally posted by @vladimir-8 in https://github.com/coopcycle/coopcycle-app/pull/1767#discussion_r1576631152_
we can get rid from some of this boilerplate by using
createAsyncThunk
from redux toolkit, it will create all these actions internally, see an example here: https://github.com/coopcycle/coopcycle-app/blob/21ba9b6a271e8cde8134dc1b2ca36b07aec45b9a/src/redux/Restaurant/actions.js#L427-L436_Originally posted by @vladimir-8 in https://github.com/coopcycle/coopcycle-app/pull/1767#discussion_r1576631152_