export { NavigationActions, StackActions } from 'react-navigation'

export { default as SyncStorage } from './SyncStorage'
export { default as ScreenUtil } from './screen'

export const createAction = type => payload => ({ type, payload })

export function getUrlParameter(name, str) {
    const reg = new RegExp(`(^|&)${name}=([^&]*)(&|$)`);
    const r = str.substr(1).match(reg);
    if (r != null) return  decodeURIComponent(r[2]);
    return null;
}
