[gproro-shop-app] product 데이터가져오기 with Redux thunk
·
⛲ 프로젝트/👖gproro-shop-app
드디어 데이터를 가져와보자.. https://fakestoreapi.com/ Fake Store APIFake store rest api for your ecommerce or shopping website prototypefakestoreapi.com 이걸 사용해서 가져올거다. 1. CardList 컴포넌트 생성 import React, { useEffect } from 'react'import { useAppDispatch, useAppSelector } from '../../../hooks/redux'import CardItem from '../card-list/card-item/CardItem'import styles from '../card-list/CardList.module.scss'cons..
[gproro-shop-app] category 컴포넌트 구현 with Redux
·
⛲ 프로젝트/👖gproro-shop-app
이 중에 맨 상단에 카테고리 탭을 구현할 것이다. 1. 카테고리 슬라이스 생성카테고리 폴더안에 파일을 만들어준 뒤export const CategoriesName = {    All:"",    Electronics:"Electronics",    Jewelry:"Jewelery",    MensClothing:"Men's clothing",    WomensClothing:"Women's clothing"} type 파일을 만들고,  import { createSlice } from "@reduxjs/toolkit";import { CategoriesName } from "./categories.type";const initialState = CategoriesName.All;   //초기에는 "" c..