What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-01-22 12:15:02
mern stack delete
//MERN STACK DELETE //Route import { deletePost } from "../controllers/posts.js" router.delete("./:id", deletePost) //Controller export const deletePost = async (req, res) => { const { id } = req.params; if (!mongoose.Types.O... Add solution -
Javascript 2021-11-12 04:58:15
redux saga fetch data using axios
// action type const FETCH_ALL = "FETCH_ALL"; const FETCH_FAIL = "FETCH_FAIL"; // initial state const fetchState = { users: [], error: "" }; //action creator const fetchDataAsync = () => { return (dispatch) => {... Add solution -
Javascript 2021-11-03 08:35:12
redux fetch data using axios
// action type const FETCH_ALL = "FETCH_ALL"; const FETCH_FAIL = "FETCH_FAIL"; // initial state const fetchState = { users: [], error: "" }; //action creator const fetchDataAsync = () => { return (dispatch) => {... Add solution -
Javascript 2021-09-04 17:10:01
using redux with hooks
import React from "react"; import { useDispatch, useSelector } from "react-redux"; import { addCount } from "./store/counter/actions"; export const Count = () => { const count = useSelector(state => state.counter.cou... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5