skip to Main Content

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

3

Answers


  1. Chosen as BEST ANSWER

    I got a solution and it worked. Add an empty jsconfig.js file on the root folder then it will show createSlice intellisense automatically.


  2. You never actually imported the createSlice function.

    Your file needs an appropriate import statement:

    import { createSlice } from "@reduxjs/toolkit";
    
    Login or Signup to reply.
  3. 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 ;
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search