Skip to content

Commit 69db792

Browse files
authored
Merge pull request #2549 from ahmetcetin/patch-1
added missing invalidateSubreddit action
2 parents 8fd4b9b + 82c84ac commit 69db792

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/advanced/AsyncActions.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,14 @@ function receivePosts(subreddit, json) {
332332
}
333333
}
334334

335+
export const INVALIDATE_SUBREDDIT = 'INVALIDATE_SUBREDDIT'
336+
export function invalidateSubreddit(subreddit) {
337+
return {
338+
type: INVALIDATE_SUBREDDIT,
339+
subreddit
340+
}
341+
}
342+
335343
// Meet our first thunk action creator!
336344
// Though its insides are different, you would use it just like any other action creator:
337345
// store.dispatch(fetchPosts('reactjs'))
@@ -442,6 +450,14 @@ function receivePosts(subreddit, json) {
442450
}
443451
}
444452

453+
export const INVALIDATE_SUBREDDIT = 'INVALIDATE_SUBREDDIT'
454+
export function invalidateSubreddit(subreddit) {
455+
return {
456+
type: INVALIDATE_SUBREDDIT,
457+
subreddit
458+
}
459+
}
460+
445461
function fetchPosts(subreddit) {
446462
return dispatch => {
447463
dispatch(requestPosts(subreddit))

0 commit comments

Comments
 (0)