skip to Main Content

Reactjs – use reselect with two or three parameters?

This is an example from reselect documents const selectItemsByCategory = createSelector( [ state => state.items, (state, category) => category ], (items, category) => items.filter(item => item.category === category) ) usage on react const myitems = useSelector( (state) => selectItemsByCategory(state, 'CatName')…

VIEW QUESTION

Javascript – Filtering notices with redux-toolkit

This is my notesSlice: import { createSlice, createAsyncThunk } from "@reduxjs/toolkit"; import axios from "axios"; const url = "http://localhost:8000/"; const initialState = { notices: [], }; export const getNotices = createAsyncThunk( "notices/getNotices", async (_name, thunkAPI) => { try { const…

VIEW QUESTION
Back To Top
Search