E
Size: a a a
E
MK
E
MK
MK
E
export function getData() {
return new Promise((resolve, reject) => {
db.transaction(tx => {
tx.executeSql(
'SELECT * FROM List', [],
(_, {rows}) =>
resolve((rows.raw())));
}, error => {
reject(error);
});
})
}
E
MK
V
const getProductsThunkCreator = () => {
return (dispatch) => {
getData()
.then(data => data.
forEach(
d => typeof d === 'string' && JSON.parse(d.ingredients) || d))
.then(data => dispatch(InitialLoadCreator(data)))
}
}
V
E
ОЖ
BB
AS
BB
AS
BB
BB