Created
February 22, 2021 20:03
-
-
Save AllGistsEqual/b22ba7439218fcd57e8d56a168ef7a4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File: src/redux/ducks/article.ts | |
/* eslint-disable no-param-reassign */ | |
import { Middleware } from 'redux' | |
import { createAction, createReducer } from '@reduxjs/toolkit' | |
import { apiRequest } from './api' | |
export type Article = { | |
title: string | |
author: string | |
date: number | |
tags: string[] | |
excerpt: string | |
urls: { | |
page: string | |
url: string | |
}[] | |
} | |
export type RequestStatus = 'idle' | 'pending' | |
type InitialState = { | |
data: Article[] | null | |
status: RequestStatus | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment