Improved activity editor re-renders (#4149)
* Refactor task count * Fixed show page rerender * Less rerenders and way better title and body UX * Finished breaking down activity editor subscriptions * Removed console.log * Last console.log * Fixed bugs and cleaned
This commit is contained in:
@ -0,0 +1,9 @@
|
||||
import { atomFamily } from 'recoil';
|
||||
|
||||
export const activityBodyFamilyState = atomFamily<
|
||||
string,
|
||||
{ activityId: string }
|
||||
>({
|
||||
key: 'activityBodyFamilyState',
|
||||
default: '',
|
||||
});
|
||||
@ -0,0 +1,6 @@
|
||||
import { atom } from 'recoil';
|
||||
|
||||
export const activityIdInDrawerState = atom<string | null>({
|
||||
key: 'activityIdInDrawerState',
|
||||
default: null,
|
||||
});
|
||||
@ -1,8 +0,0 @@
|
||||
import { atom } from 'recoil';
|
||||
|
||||
import { Activity } from '@/activities/types/Activity';
|
||||
|
||||
export const activityInDrawerState = atom<Activity | null>({
|
||||
key: 'activityInDrawerState',
|
||||
default: null,
|
||||
});
|
||||
@ -0,0 +1,9 @@
|
||||
import { atomFamily } from 'recoil';
|
||||
|
||||
export const activityTitleFamilyState = atomFamily<
|
||||
string,
|
||||
{ activityId: string }
|
||||
>({
|
||||
key: 'activityTitleFamilyState',
|
||||
default: '',
|
||||
});
|
||||
Reference in New Issue
Block a user