Last active
February 5, 2019 15:46
-
-
Save JonnyBurger/ac20dbebf3bdb9a95881b0b6dfdf6860 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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