RTL/Hebrew support with React Native + react-navigation and redux-persistWhat is the difference between React Native and React?react-native-tab-navigator and redux performance issueReact Navigation redirect on redux store change in componentStore navigation state and resume from it only while registeringRedux persist v5 not working as it is supposed toReact Navigation - Dynamic Text (translations) needed in drawerNavigator drawerLabels from Redux storeIn a React-Native app, how to use SwitchNavigator (react-navigator) and react-redux?When starting React Native app, I'm error that functions are not valid as React childredux-persists not working with react native appPersistGate in redux-persist doesn't wait the store to be rehydrated

Is a ccH, ccX and ccH equivalent to a cH, ccX and cH sequence?

Odd PCB Layout for Voltage Regulator

How do I tell my girlfriend she's been buying me books by the wrong author for the last nine months?

Searching for single buildings in QGIS

Why did the Middle Kingdom stop building pyramid tombs?

Does Dhp 256-257 condone judging others?

What is the function of const specifier in enum types?

Variable declaration inside main loop

"Best practices" for formulating MIPs

Confusion in understanding the behavior of inductor in RL circuit with DC source

How to idiomatically express the idea "if you can cheat without being caught, do it"

Does friction always oppose motion?

Why is my 401k manager recommending me to save more?

Tricky riddle from sister

A quine of sorts

Are there advantages in writing by hand over typing out a story?

Avoiding repetition when using the "snprintf idiom" to write text

How can solar sailed ships be protected from space debris?

Can you run PoE Cat6 alongside standard Cat6 cables?

Does the Mac version of BitDefender detect Windows malware?

Count a Torah scroll as the tenth in a minyan?

Is it advisable to inform the CEO about his brother accessing his office?

Existence of infinite set of positive integers s.t sum of reciprocals is rational and set of primes dividing an element is infinite

Other homotopy invariants?



RTL/Hebrew support with React Native + react-navigation and redux-persist


What is the difference between React Native and React?react-native-tab-navigator and redux performance issueReact Navigation redirect on redux store change in componentStore navigation state and resume from it only while registeringRedux persist v5 not working as it is supposed toReact Navigation - Dynamic Text (translations) needed in drawerNavigator drawerLabels from Redux storeIn a React-Native app, how to use SwitchNavigator (react-navigator) and react-redux?When starting React Native app, I'm error that functions are not valid as React childredux-persists not working with react native appPersistGate in redux-persist doesn't wait the store to be rehydrated













0















so I've got stuck while implementing Hebrew and RTL support inside React Native App (with Expo SDK) which is using react-navigation and redux-persist.



As users of my app should be able to change language inside the app (so I don't really care about system language, only while the very first opening of the app) I'm currently using redux-persist to keep redux state after relaunching the app.



I've also created simple helper function which is only getting state from redux store:



export function isHebrew() 
return !!(getReduxLanguage().locale.includes('he') && getReduxIsRTL());



The problem is that I'm using that helper function isHebrew inside my StyleSheets to decide how to render components and also inside react-navigation's createNavigator for the same purpose to change order of items in bottomTabBar BUT stylesheets and navigator are somehow called before redux-persist rehydrates store, which ends in wrong render of the whole app (isHebrew is always false before rehydration as initialState is empty for language before rehydration).



So my question is:
how to postpone stylesheet and navigation loading to occur after redux-persist store rehydration?



I'm doing it like that:



App.js

...
componentDidMount()
this.persistor = persistStore(store, null, () =>
this.setState( isReduxRehydrated: true );
);


render()
if (!this.state.isLoadingComplete && !this.state.isReduxRehydrated)
return (
<AppLoading
startAsync=this._loadResourcesAsync
onError=this._handleLoadingError
onFinish=this._handleFinishLoading
/>
);

return (
<Provider store=store>
<PersistGate loading=<ActivityIndicator/> persistor=this.persistor>
<Root />
</PersistGate>
</Provider>
);

...


but this is not working, even if I comment out component isHebrew is still being called inside stylesheets/navigator before redux-persist.



Usage inside stylesheets:



StyleSheet.create(
container:
flexDirection: isHebrew() ? 'row-reverse' : 'row',

)


Usage inside navigation:



const tabNavigator = createBottomTabNavigator(

HomeStack,
ProfileStack,
ScheduleStack,
MarketStack,
MoreStack
,

tabBarOptions:
showLabel: false,
style:
flexDirection: isHebrew() ? 'row-reverse' : 'row',



);









share|improve this question


























    0















    so I've got stuck while implementing Hebrew and RTL support inside React Native App (with Expo SDK) which is using react-navigation and redux-persist.



    As users of my app should be able to change language inside the app (so I don't really care about system language, only while the very first opening of the app) I'm currently using redux-persist to keep redux state after relaunching the app.



    I've also created simple helper function which is only getting state from redux store:



    export function isHebrew() 
    return !!(getReduxLanguage().locale.includes('he') && getReduxIsRTL());



    The problem is that I'm using that helper function isHebrew inside my StyleSheets to decide how to render components and also inside react-navigation's createNavigator for the same purpose to change order of items in bottomTabBar BUT stylesheets and navigator are somehow called before redux-persist rehydrates store, which ends in wrong render of the whole app (isHebrew is always false before rehydration as initialState is empty for language before rehydration).



    So my question is:
    how to postpone stylesheet and navigation loading to occur after redux-persist store rehydration?



    I'm doing it like that:



    App.js

    ...
    componentDidMount()
    this.persistor = persistStore(store, null, () =>
    this.setState( isReduxRehydrated: true );
    );


    render()
    if (!this.state.isLoadingComplete && !this.state.isReduxRehydrated)
    return (
    <AppLoading
    startAsync=this._loadResourcesAsync
    onError=this._handleLoadingError
    onFinish=this._handleFinishLoading
    />
    );

    return (
    <Provider store=store>
    <PersistGate loading=<ActivityIndicator/> persistor=this.persistor>
    <Root />
    </PersistGate>
    </Provider>
    );

    ...


    but this is not working, even if I comment out component isHebrew is still being called inside stylesheets/navigator before redux-persist.



    Usage inside stylesheets:



    StyleSheet.create(
    container:
    flexDirection: isHebrew() ? 'row-reverse' : 'row',

    )


    Usage inside navigation:



    const tabNavigator = createBottomTabNavigator(

    HomeStack,
    ProfileStack,
    ScheduleStack,
    MarketStack,
    MoreStack
    ,

    tabBarOptions:
    showLabel: false,
    style:
    flexDirection: isHebrew() ? 'row-reverse' : 'row',



    );









    share|improve this question
























      0












      0








      0








      so I've got stuck while implementing Hebrew and RTL support inside React Native App (with Expo SDK) which is using react-navigation and redux-persist.



      As users of my app should be able to change language inside the app (so I don't really care about system language, only while the very first opening of the app) I'm currently using redux-persist to keep redux state after relaunching the app.



      I've also created simple helper function which is only getting state from redux store:



      export function isHebrew() 
      return !!(getReduxLanguage().locale.includes('he') && getReduxIsRTL());



      The problem is that I'm using that helper function isHebrew inside my StyleSheets to decide how to render components and also inside react-navigation's createNavigator for the same purpose to change order of items in bottomTabBar BUT stylesheets and navigator are somehow called before redux-persist rehydrates store, which ends in wrong render of the whole app (isHebrew is always false before rehydration as initialState is empty for language before rehydration).



      So my question is:
      how to postpone stylesheet and navigation loading to occur after redux-persist store rehydration?



      I'm doing it like that:



      App.js

      ...
      componentDidMount()
      this.persistor = persistStore(store, null, () =>
      this.setState( isReduxRehydrated: true );
      );


      render()
      if (!this.state.isLoadingComplete && !this.state.isReduxRehydrated)
      return (
      <AppLoading
      startAsync=this._loadResourcesAsync
      onError=this._handleLoadingError
      onFinish=this._handleFinishLoading
      />
      );

      return (
      <Provider store=store>
      <PersistGate loading=<ActivityIndicator/> persistor=this.persistor>
      <Root />
      </PersistGate>
      </Provider>
      );

      ...


      but this is not working, even if I comment out component isHebrew is still being called inside stylesheets/navigator before redux-persist.



      Usage inside stylesheets:



      StyleSheet.create(
      container:
      flexDirection: isHebrew() ? 'row-reverse' : 'row',

      )


      Usage inside navigation:



      const tabNavigator = createBottomTabNavigator(

      HomeStack,
      ProfileStack,
      ScheduleStack,
      MarketStack,
      MoreStack
      ,

      tabBarOptions:
      showLabel: false,
      style:
      flexDirection: isHebrew() ? 'row-reverse' : 'row',



      );









      share|improve this question














      so I've got stuck while implementing Hebrew and RTL support inside React Native App (with Expo SDK) which is using react-navigation and redux-persist.



      As users of my app should be able to change language inside the app (so I don't really care about system language, only while the very first opening of the app) I'm currently using redux-persist to keep redux state after relaunching the app.



      I've also created simple helper function which is only getting state from redux store:



      export function isHebrew() 
      return !!(getReduxLanguage().locale.includes('he') && getReduxIsRTL());



      The problem is that I'm using that helper function isHebrew inside my StyleSheets to decide how to render components and also inside react-navigation's createNavigator for the same purpose to change order of items in bottomTabBar BUT stylesheets and navigator are somehow called before redux-persist rehydrates store, which ends in wrong render of the whole app (isHebrew is always false before rehydration as initialState is empty for language before rehydration).



      So my question is:
      how to postpone stylesheet and navigation loading to occur after redux-persist store rehydration?



      I'm doing it like that:



      App.js

      ...
      componentDidMount()
      this.persistor = persistStore(store, null, () =>
      this.setState( isReduxRehydrated: true );
      );


      render()
      if (!this.state.isLoadingComplete && !this.state.isReduxRehydrated)
      return (
      <AppLoading
      startAsync=this._loadResourcesAsync
      onError=this._handleLoadingError
      onFinish=this._handleFinishLoading
      />
      );

      return (
      <Provider store=store>
      <PersistGate loading=<ActivityIndicator/> persistor=this.persistor>
      <Root />
      </PersistGate>
      </Provider>
      );

      ...


      but this is not working, even if I comment out component isHebrew is still being called inside stylesheets/navigator before redux-persist.



      Usage inside stylesheets:



      StyleSheet.create(
      container:
      flexDirection: isHebrew() ? 'row-reverse' : 'row',

      )


      Usage inside navigation:



      const tabNavigator = createBottomTabNavigator(

      HomeStack,
      ProfileStack,
      ScheduleStack,
      MarketStack,
      MoreStack
      ,

      tabBarOptions:
      showLabel: false,
      style:
      flexDirection: isHebrew() ? 'row-reverse' : 'row',



      );






      react-native react-redux react-navigation redux-persist






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 25 at 17:06









      chcl3lionchcl3lion

      11 bronze badge




      11 bronze badge




















          0






          active

          oldest

          votes










          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%2f55343051%2frtl-hebrew-support-with-react-native-react-navigation-and-redux-persist%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using 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%2f55343051%2frtl-hebrew-support-with-react-native-react-navigation-and-redux-persist%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

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해