react i18next file override issue in microfrontend - react-i18next

Iam facing issue in integrating react-i18next with micro frontend. Each micro app has react-i18next dep and its loading its resource file async way. When traversing b/w app using react Link Router, it is overriding other resource file or picking other app resource file

Related

Can React Js application be hosted on S3 bucket

I thought we can only host Static websites onto S3 bucket.
How can React Js apps be hosted onto S3? React pages are dynamic in my understanding. The content of the page changes based on the user choices made on the page. Isn't that correct?
thank you
React pages are dynamic in my understanding.
Your definition of "dynamic" and S3's definition of "dynamic" are not the same thing.
Everything that's changing in the React application is happening in the browser. It's just the browser running JavaScript code. Nothing on S3 prevents a browser from running JavaScript code.
What they mean is that you can't have dynamic server-side content, such as a Node.js application or a PHP application.
The React application is served to the user by static HTML/JavaScript/CSS files.
React is a Single-page application (SPA) with browser -side rendering. A Single-page application (SPA) is a web application implementation that loads a web document and updates it by using JavaScript APIs in the browser. In simple terms, when a web application written in react works, the browser download the application files and run it using JavaScript on browser with the support of react libraries. Therfore the content in react app (min.js files and other assests in a production build) are not changing with time. A static storage and a public access(url) is the sufficiant to host a react application. So it can be host in a S3 bucket or github-pages or similar static storage without any computing power.
In a react webapp what's dynamic is the rendering of HTML elements using javascript. A dynamic web application refered by AWS is a one with dynamic server side rendering as Node.js. You can refer this guide to learn more on how to deploy a React application in Amazon S3.

How to access data stored using cordova-plugin-secure-storage from a Reac Native app?

I have a Cordova based mobile application in which some data were saved on the device using cordova-plugin-secure-storage. For example:
var ss = new cordova.plugins.SecureStorage(
function() {
console.log("Success");
},
function(error) {
console.log("Error " + error);
},
"my_namespace"
);
Where my_namespace indicates the namespaced secure storage used by plugin.
Now I have to write a new version of this mobile application, but using React Native instead of Ionic Cordova. The problem is that I need to still access the Secure Storage data of the previous application. There are some React Native plugins that are similar to cordova-plugin-secure-storage that allow me to access to the namespaced Secure Storage?
You could fetch your web kit local storage using this module react-native-webkit-localstorage-reader
But the module which you used, seems to be use sharedPreference on android and keychain for iOS so you may need to fetch data from those places. My suggestion is to write your own native module using same functionality of cordova-plugin-secure-storage in react native. In this way you will be able use same secure storage if you wish to continue with your react native app also if not in initial react native app release you could migrate all of your data to React Native Async Storage
Helpful reference for making native module:
Native Modules iOS
Native Module android
Creating a Native Module in React Native
Note : Your data was encrypted, So you may need to use same decryption functionality which was used in your previous module.

How to integrate unity3d AR app inside React native app

As I mentioned, I need to insert a unity project into an app in react native.
I saw that there is this component that should help me do this (react native unity view).
I saw that there is a way to intercept messages sent by unity. (onUnityMessage method), but how do I send some data from react native app to unity? (example: auth token).
I must be able to send the token to unity so that it can be used by unity app.
How can I do this?
thank you in advance!

How we can connect React Native App to octobercms backend?

We are developing new app, and we choose octobercms like backend.
How to connect React Native with octobercms and login with JWT.
Tks,
you can not :(
but you can create a backend API system to sarve and manage your data for your React APP,
mabye this video series can help you to know about how to you can, on
this viedo use Octobercms as backend api system and use vue.js as Frontend
Framework same like octobercms and react etc....
https://watch-learn.com/series/creating-rent-car-app-vue-and-october
i hope help you

Migrating a native app to a RN/Expo app: keep user authenticated

I want to migrate an existing Android+iOS native app to a react-native Expo app.
In current native app, we store an auth token. I'd like this auth token to be available through ReactNative AsyncStorage api out of the box, without requiring RN native code (ie, ejecting Expo).
Is this possible, in current native app, to start writing to the same place as AsyncStorage will read after the migration?
We aim for the smoothest transition from native app to RN app, and user should stay authenticated after the upgrade.
Depends on what you're current app is using for storage. I recently used this library (https://github.com/kevinresol/react-native-default-preference) to get the data from user defaults then move it into async storage. I only migrate the refresh token and auth token.
If they are using core data, then you'll need to setup the same models etc - https://github.com/realm/realm-js/issues/584
The other storage mechanisms you can easily find a native package to get the data.
if the app is under same app name scheme you may be able to access after upgrade i guess.