title: Why actions in reduxjs-toolkit are not exported ? (Reactjs - reduxToolkit)
body: <p>I am using @reduxjs/toolkit and reactjs to build a shopping cart, and when I export the actions from Cart.js and try to import them into other files like cart.jsx and header.jsx, it says :
  <a href="https://i.stack.imgur.com/zu9J5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zu9J5.png" alt="Error statement" /></a></p>
  <p>and when check the CONSOLE after clicking on the addTocart button which call the imported action of addToCart, it says:
  <a href="https://i.stack.imgur.com/OhYSk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OhYSk.png" alt="console error" /></a></p>
  <p>this is cart.js (located in redux folder) code:</p>
  <pre><code>import { createSlice } from &quot;@reduxjs/toolkit&quot;;
  
  export const cartSlice = createSlice({
    name: &quot;cart&quot;,
    initialState: {
      cartProds: []
      },
    reducers: {
      addToCart: (state, {payload})=&gt;{
         const exist = state.cartProds.find(prod =&gt; prod.id === payload.id);
         if(exist){
              return  state.cartProds.map(prod =&gt; prod.id === payload.id ? {...prod, quantity: prod.quantity + 1}: prod);
         }
         if(!exist){
          return  state.cartProds = [...state, {...payload, quantity: 1}];
         }
      },
      removeFromCart :(state, {payload}) =&gt;{
          const exist1 = state.find( prod =&gt; prod.id === payload.id);
          if(exist1.quantity === 1){
              return state.filter(prod =&gt; prod.id !== exist1.id);
          }else{
              return state.map(prod =&gt; prod.id === payload.id ? {...prod, quantity:prod.quantity-1}: prod);
          }
      }
    }
  });
  
  export const { addTocart, removeFromCart } = cartSlice.actions;
  export default cartSlice.reducer;
  
  </code></pre>
  <p>and this is the way I imported them (the path is absolutely correct ! ):</p>
  <pre><code>import { addToCart, removeFromCart } from '../redux/cart.js';
  
  </code></pre>