Skip to content

Commit

Permalink
133: export variables for re-use.
Browse files Browse the repository at this point in the history
  • Loading branch information
rowrowrowrow authored and aohua committed Feb 14, 2022
1 parent 37841b3 commit a34bb47
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/syncState.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { BroadcastChannel } from 'broadcast-channel';

let lastUuid = 0;
const GET_INIT_STATE = '&_GET_INIT_STATE';
const SEND_INIT_STATE = '&_SEND_INIT_STATE';
const RECEIVE_INIT_STATE = '&_RECEIVE_INIT_STATE';
const INIT_MESSAGE_LISTENER = '&_INIT_MESSAGE_LISTENER';
export const GET_INIT_STATE = '&_GET_INIT_STATE';
export const SEND_INIT_STATE = '&_SEND_INIT_STATE';
export const RECEIVE_INIT_STATE = '&_RECEIVE_INIT_STATE';
export const INIT_MESSAGE_LISTENER = '&_INIT_MESSAGE_LISTENER';

const defaultConfig = {
channel: 'redux_state_sync',
Expand All @@ -31,7 +31,7 @@ function guid() {
}

// generate current window unique id
const WINDOW_STATE_SYNC_ID = guid();
export const WINDOW_STATE_SYNC_ID = guid();
// export for test
export function generateUuidForAction(action) {
const stampedAction = action;
Expand Down

0 comments on commit a34bb47

Please sign in to comment.