File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff 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+ 
445461function  fetchPosts (subreddit ) {
446462  return  dispatch  =>  {
447463    dispatch (requestPosts (subreddit))
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments