![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@app-masters/sync-cache
Advanced tools
## Description Classes for deal with local persistence of data and online synchronization Sync deals with external API and duplicate the data to redux store. At the same time, can have unsynchronized data on local storage.
Classes for deal with local persistence of data and online synchronization Sync deals with external API and duplicate the data to redux store. At the same time, can have unsynchronized data on local storage.
On the App.js
, import and give desired model list to setup./
import { AmSync, AmSyncCache } from '@app-masters/sync-cache';
...
// Custom conflict rule (Priories newest object)
const conflictRule = (cacheObject, onlineObject) => {
const dateCache = new Date(cacheObject.updatedAt).getDate();
const dateOnline = new Date(onlineObject.updatedAt).getDate();
if (dateCache < dateOnline) {
return onlineObject;
} else {
return cacheObject;
}
};
// Default config for USER actions
const userReduxConfig = {
validateObject: () => {}, // required
prepareToServer: (item) => item,
prepareToClient: (item) => item,
conflictRule: conflictRule,
typePrefix: 'USER', // required
endPoint: '/users/', // required
cacheStrategy: 'CacheOnline',
createSuffix: '',
updateSuffix: '',
deleteSuffix: '',
primaryKey: '_id'
};
AmSyncCache.setStorage(storage); // using @app-masters/realm-async-storage
const UserActions = new AmSync(userReduxConfig);
Most of the methods are called by redux as redux-thunk
actions.
For synchonization, some methods are available on each instance, not requiring to be called as a redux action.
_cacheCreatedAt
and sync it with API_cacheUpdatedAt
and sync it with API_cacheDeletedAt
and sync it with APIFor running the tests, you can run a local API for integration tests. On another CLI, make API available on port 3000 with running the script:
$ cd api
$ npm run dev
[0.4.1] - 2018-12-20
FAQs
## Description Classes for deal with local persistence of data and online synchronization Sync deals with external API and duplicate the data to redux store. At the same time, can have unsynchronized data on local storage.
The npm package @app-masters/sync-cache receives a total of 0 weekly downloads. As such, @app-masters/sync-cache popularity was classified as not popular.
We found that @app-masters/sync-cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.