Main menu

Skip to content
  • Home/
  • Life/
  • Random/
  • Snippets/
  • Tutorials/
  • Music/
  • Photos/
  • Gallery/
About me

My 2 Bits On The Web

Not really a blog, who am I kidding

Tag Archives: dispatch

Post navigation

Dispatch an action to redux from any file

Posted on 28 September 2016

After creating the store add this:

export const dispatch = store.dispatch

And then whenever you need to dispatch something:

import { dispatch } from './FileThatExportsDispatch'

And then simply

dispatch(action())

Mandatory read:
Reply to: How to dispatch a Redux action with a timeout?

+1095
Posted in Snippets | Tagged actions, dispatch, react, react native, redux | Leave a comment
+1095

Post navigation

Buy me a Beer!

Recent Posts

  • GraphQL for total noobs
  • Create an ENS (.eth) subdomain
  • React: reduce app bundle size
  • rsync: Copy only modified files, leave owners and permissions alone, and exclude dirs
  • Nginx, userdirs and PHP
  • React Native: get end position after scrolling a ScrollView
  • Dispatch an action to redux from any file
  • React Native: Trigger something in RN from WebView
  • React Native: Upload (any) file to S3 with a presigned URL
  • React Native: Prevent keyboard from hiding TextInput fields on the bottom of the screen

Tags

8.1 actions app bundle C# cordova create-react-app daft punk dispatch django download drag drawer files filesize forms javascript keyboard life listview microsoft models momentum music phonegap php portorož preact raect react react native scrollend scrollview sharepoint simplicy store sunset typescript upload windows windows phone work wp wpf xaml

Search

Congrats, you made it to the bottom of the page! Cookie?