@ -9,7 +9,8 @@ const reducer = {
// @ts-ignore
const store = configureStore({
reducer: reducer,
reducer,
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({
serializableCheck: false
@ -21,11 +21,13 @@ export function AccueilScreen() {
useEffect(() => {
const getJokes = async () => {
dispatch(setRecentJokes(await getLatestJokes()));
};
getJokes();
const getTopCategories = async () => {
dispatch(setCategories(await getCategorie()));
getTopCategories();
@ -13,6 +13,7 @@ export function ListJokeScreen() {
const dispatch = useDispatch();
dispatch(setSample(await getSampleJoke()));