react-indexed-db
react-indexed-db copied to clipboard
Accessing multiple object store
How to access multiple object store data <IndexedDB name={Constants.IdbDBConfig.name} version={1} objectStoresMeta={[Constants.indexDbSchema, Constants.indexDbSchema.plant]}> <AccessDB objectStore={Constants.indexDbSchema.store}> //----> here I can only access one store {({ add, getAll, update , getByID}) => { }} </AccessDB> </IndexedDB> creating multiple store is also not working it creates only first store in the objectStoreMeta
@darshanksexathought
Creating multiple store is working. Check this
https://github.com/assuncaocharles/react-indexed-db/issues/5
You can use aliases for methods...
let { add : myCustnomAddName, getAll : myCustom } = useIndexedDB('model')