Home > Software design >  createSlice in React redux toolkit is not showing intellisense in VS CODE
createSlice in React redux toolkit is not showing intellisense in VS CODE

Time:01-04

When i type "createSlice" it is not showing any intellisense in VS CODE. create slice VS code

CodePudding user response:

You never actually imported the createSlice function.

Your file needs an appropriate import statement:

import { createSlice } from "@reduxjs/toolkit";

CodePudding user response:

Make sure two things:

  1. Did you import it??? Like this :
import { createSlice } from "@reduxjs/toolkit";
  1. Are you sure that reac-toolkit is installed? Check your Json file, if not then do this:
npm install @reduxjs/toolkit ;
  • Related