[lib] introduce community reducer
Summary:
This diff introduces the barebones community reducer and all the necessary logic to get it integrated into our codebase. Subsequent diffs will handle extending the community reducer to handle other cases we need to cover in our business logic
Linear task: https://linear.app/comm/issue/ENG-6159/introduce-community-reducer and https://linear.app/comm/issue/ENG-6535/start-processing-community-store-ops-on-sqllite
Depends on D11165
Test Plan:
Ran the following code + confirmed that a community was being added from this dispatched action
const dispatch = useDispatch(); const fakeCommunityID = '256|84261'; const onPressAddCommunity = React.useCallback(() => { const communityInfo: CommunityInfo = { enabledApps: { calendar: true, wiki: false, tasks: true, files: true, }, }; dispatch({ type: addCommunityActionType, payload: { id: fakeCommunityID, newCommunityInfo: communityInfo, }, }); }, [dispatch]);
Reviewers: atul, inka, kamil, tomek
Reviewed By: atul, kamil, tomek
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D11166