You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
exportconst[fetchFacts,// this is an action creatorFETCH_FACTS,FETCH_FACTS_PENDING,FETCH_FACTS_FULFILLEDFETCH_FACTS_REJECTED]=createAction('FETCH_FACTS',getFacts);
fetchFacts is an action creator
FETCH_FACTS is an action type that is dispatched when the promise
fulfills. This action will include a payload with the fulfilled value.
FETCH_FACTS_PENDING is an action type that is dispatched before
the promise fulfills.
FETCH_FACTS_FULFILLED is an action type that is dispatched if
the promise fulfills.
FETCH_FACTS_REJECTED is an action type that is dispatched if
the promise rejects. This action will also include a payload
with an error.
createAction is a function that takes the name of an action type and a promise and returns all of the above in an array.