Skip to content

SPA app. Games library. made with react-router-redux-thunk + styled components + framer-motion + infinite scroll

Notifications You must be signed in to change notification settings

cold-world/gamesfinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gamesfinder.

React, Redux, Redux Thunk, Styled Components, Framer Motion.

Main goal -> get data from API, use different filter params, infinite scroll, animations.


Alt Text


A piece of code

//fetch games for infinite scroll
export const fetchGames = createAsyncThunk(
  'games/fetchGames',
  async (url, { rejectWithValue, dispatch }) => {
    const response = await axios.get(url);

    try {
      if (response.status !== 200) {
        throw new Error(
          'Something went wrong with server... Try again later please.'
        );
      } else {
        dispatch(getcurrentFetchUrl(url));
        return response.data.results;
      }
    } catch (error) {
      return rejectWithValue(error.message);
    }
  }
);

Download & Installation

git clone https://github.com/cold-world/gamesfinder.git
cd <project-dir>
npm install
npm run dev

About

SPA app. Games library. made with react-router-redux-thunk + styled components + framer-motion + infinite scroll

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published