Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
GIST: {}, // Gist的详情
GISTS: [] // Gist列表
};
const middlewares = applyMiddleware(
logger(),
persist({ key: "[rz]", storage: localForage }, function(err, state) {
if (err) {
console.error(err);
} else {
store.setState(state);
}
})
);
const store = createStore(initialState, middlewares);
export default store;
gdpr.toggleService();
}
const initialState: StoreType = {
gdpr: gdpr,
showModal: false,
showBanner: isFirstVisit,
locale,
messages,
// previous state list service for compare on save
prevListService: gdpr.getListServices(),
listService: gdpr.getListServices(),
isFirstVisit,
};
const store = createStore(initialState);
// if first visit detect click change page or action
if (isFirstVisit === true) {
listenClick(store);
}
// set global method for change setting cookie with click on link
global._gdpr_showModal = () => {
store.setState({showModal: true});
};
return store;
};
import createStore from 'redux-zero';
const initialState = { count: 0 };
const store = createStore(initialState);
export default store;
import createStore from "redux-zero";
const initialState = { count: 1 };
export default createStore(initialState);
import createStore from 'redux-zero'
const initialState = {
shown: false,
characters: [],
steamID: null,
}
export default createStore(initialState)