Skip to content

Instantly share code, notes, and snippets.

@JonnyBurger
Last active February 5, 2019 15:46
Show Gist options
  • Save JonnyBurger/ac20dbebf3bdb9a95881b0b6dfdf6860 to your computer and use it in GitHub Desktop.
Save JonnyBurger/ac20dbebf3bdb9a95881b0b6dfdf6860 to your computer and use it in GitHub Desktop.
import { createStore, applyMiddleware } from "redux";
import { Constants } from "expo";
import { composeWithDevTools } from "remote-redux-devtools";
import reducer from "./reducer";
const ipMatch = Constants.manifest.hostUri.match(/([0-9.]+):/)[1]
export default createStore(
reducer,
applyMiddleware(
composeWithDevTools({
hostname: `${ipMatch ? ipMatch[1] : 'localhost'}:5678`
})
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment