[lib/native/web] introduce synced metadata reducer
Summary:
Introduces the synced metadata reducer which handles replace, remove, and remove all ops.
Depends on D11421
Test Plan:
Ran the following code:
const onPressSave = React.useCallback(async () => { dispatch({ type: addSyncedMetadataEntryActionType, payload: { name: 'Test_1_name', data: 'Test_1_data', }, }); dispatch({ type: addSyncedMetadataEntryActionType, payload: { name: 'Test_2_name', data: 'Test_2_data', }, }); dispatch({ type: addSyncedMetadataEntryActionType, payload: { name: 'Test_1_name', data: 'Test_1_update', }, }); dispatch({ type: removeSyncedMetadataEntryActionType, payload: { name: 'Test_2_name', }, }); }, [dispatch]);
Reviewers: ginsu, atul, kamil
Reviewed By: atul, kamil
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D11422