Configure an initial state of the redux store in react-native-debugger?Where to write to localStorage in a Redux app?Redux - multiple stores, why not?How to reset the state of a Redux store?Accessing Store within Redux and React Native appReact Native setState in component updating redux storeReact-navigation Redux State managementShould I use redux-form store instead of component state and Redux custom store?Combining React local state with Redux global stateLoad redux store initial state in Detox Testinghow to pass a state to a container in react nativeReact Native & redux get current state in listener

Is this n-speak?

How to gracefully leave a company you helped start?

Are there any other rule mechanics that could grant Thieves' Cant?

Transition to "Starvation Mode" in Survival Situations

How can I communicate my issues with a potential date's pushy behavior?

How to remove ambiguity: "... lives in the city of H, the capital of the province of NS, WHERE the unemployment rate is ..."?

Would the USA be eligible to join the European Union?

(A room / an office) where an artist works

Why aren’t there water shutoff valves for each room?

Do beef farmed pastures net remove carbon emissions?

Word for an event that will likely never happen again

How to prevent criminal gangs from making/buying guns?

Human with super efficient metabolism

Should I leave building the database for the end?

Why aren't rainbows blurred-out into nothing after they are produced?

Boss wants me to ignore a software API license

If a person claims to know anything could it be disproven by saying 'prove that we are not in a simulation'?

Weird resistor with dots around it

Why command hierarchy, if the chain of command is standing next to each other?

How far did Gandalf and the Balrog drop from the bridge in Moria?

Why did IBM make the PC BIOS source code public?

Did DOS zero out the BSS area when it loaded a program?

Is it possible to arrive in the US without a C-1 visa for a transit flight

How did Arecibo detect methane lakes on Titan, and image Saturn's rings?



Configure an initial state of the redux store in react-native-debugger?


Where to write to localStorage in a Redux app?Redux - multiple stores, why not?How to reset the state of a Redux store?Accessing Store within Redux and React Native appReact Native setState in component updating redux storeReact-navigation Redux State managementShould I use redux-form store instead of component state and Redux custom store?Combining React local state with Redux global stateLoad redux store initial state in Detox Testinghow to pass a state to a container in react nativeReact Native & redux get current state in listener






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Is it possible to configure an initial state of the redux store in react-native-debugger?



I'm imagining pointing it towards a JSON file on my disk or something like that.



This would allow be to have arbitrary places in user journeys as my starting point, that require a complex state of the redux store to already be present.










share|improve this question
























  • do you actually want some redux store to be present when you start/restart your app ? if so then you can hydrate the store when the app launches

    – warl0ck
    Mar 27 at 11:14












  • Yes, that's what I want! What does "hydrating the store" mean?

    – moejoe
    Mar 27 at 11:19











  • its just fancy way of saying restoring the old saved store, I have posted the exmaple on how you can retrieve the store and save it

    – warl0ck
    Mar 27 at 12:25

















0















Is it possible to configure an initial state of the redux store in react-native-debugger?



I'm imagining pointing it towards a JSON file on my disk or something like that.



This would allow be to have arbitrary places in user journeys as my starting point, that require a complex state of the redux store to already be present.










share|improve this question
























  • do you actually want some redux store to be present when you start/restart your app ? if so then you can hydrate the store when the app launches

    – warl0ck
    Mar 27 at 11:14












  • Yes, that's what I want! What does "hydrating the store" mean?

    – moejoe
    Mar 27 at 11:19











  • its just fancy way of saying restoring the old saved store, I have posted the exmaple on how you can retrieve the store and save it

    – warl0ck
    Mar 27 at 12:25













0












0








0








Is it possible to configure an initial state of the redux store in react-native-debugger?



I'm imagining pointing it towards a JSON file on my disk or something like that.



This would allow be to have arbitrary places in user journeys as my starting point, that require a complex state of the redux store to already be present.










share|improve this question














Is it possible to configure an initial state of the redux store in react-native-debugger?



I'm imagining pointing it towards a JSON file on my disk or something like that.



This would allow be to have arbitrary places in user journeys as my starting point, that require a complex state of the redux store to already be present.







react-native redux react-redux redux-store react-native-debugger






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 27 at 10:58









moejoemoejoe

2,0272 gold badges9 silver badges16 bronze badges




2,0272 gold badges9 silver badges16 bronze badges















  • do you actually want some redux store to be present when you start/restart your app ? if so then you can hydrate the store when the app launches

    – warl0ck
    Mar 27 at 11:14












  • Yes, that's what I want! What does "hydrating the store" mean?

    – moejoe
    Mar 27 at 11:19











  • its just fancy way of saying restoring the old saved store, I have posted the exmaple on how you can retrieve the store and save it

    – warl0ck
    Mar 27 at 12:25

















  • do you actually want some redux store to be present when you start/restart your app ? if so then you can hydrate the store when the app launches

    – warl0ck
    Mar 27 at 11:14












  • Yes, that's what I want! What does "hydrating the store" mean?

    – moejoe
    Mar 27 at 11:19











  • its just fancy way of saying restoring the old saved store, I have posted the exmaple on how you can retrieve the store and save it

    – warl0ck
    Mar 27 at 12:25
















do you actually want some redux store to be present when you start/restart your app ? if so then you can hydrate the store when the app launches

– warl0ck
Mar 27 at 11:14






do you actually want some redux store to be present when you start/restart your app ? if so then you can hydrate the store when the app launches

– warl0ck
Mar 27 at 11:14














Yes, that's what I want! What does "hydrating the store" mean?

– moejoe
Mar 27 at 11:19





Yes, that's what I want! What does "hydrating the store" mean?

– moejoe
Mar 27 at 11:19













its just fancy way of saying restoring the old saved store, I have posted the exmaple on how you can retrieve the store and save it

– warl0ck
Mar 27 at 12:25





its just fancy way of saying restoring the old saved store, I have posted the exmaple on how you can retrieve the store and save it

– warl0ck
Mar 27 at 12:25












1 Answer
1






active

oldest

votes


















-1














Before creating the store just read the json file that you need with your inital state and call it that way:



// store.js
import data from "yourFile.json";
...

const mydata = JSON.parse(data);
const store = createStore(
app,
mydata
);





share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55375547%2fconfigure-an-initial-state-of-the-redux-store-in-react-native-debugger%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    -1














    Before creating the store just read the json file that you need with your inital state and call it that way:



    // store.js
    import data from "yourFile.json";
    ...

    const mydata = JSON.parse(data);
    const store = createStore(
    app,
    mydata
    );





    share|improve this answer





























      -1














      Before creating the store just read the json file that you need with your inital state and call it that way:



      // store.js
      import data from "yourFile.json";
      ...

      const mydata = JSON.parse(data);
      const store = createStore(
      app,
      mydata
      );





      share|improve this answer



























        -1












        -1








        -1







        Before creating the store just read the json file that you need with your inital state and call it that way:



        // store.js
        import data from "yourFile.json";
        ...

        const mydata = JSON.parse(data);
        const store = createStore(
        app,
        mydata
        );





        share|improve this answer













        Before creating the store just read the json file that you need with your inital state and call it that way:



        // store.js
        import data from "yourFile.json";
        ...

        const mydata = JSON.parse(data);
        const store = createStore(
        app,
        mydata
        );






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 27 at 11:33









        Carlos RuanaCarlos Ruana

        1,22811 silver badges11 bronze badges




        1,22811 silver badges11 bronze badges





















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55375547%2fconfigure-an-initial-state-of-the-redux-store-in-react-native-debugger%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript