You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constrawPageId=atom<number|undefined>({key: 'raw-page-id',default: undefined,});constrawTemplateData=atom<DesignPage<PageElementsProps>[]>({key: 'raw-template-data',default: [],});constusePageId=selector({key: 'get-page-id',get({ get }){constid=get(rawPageId);if(id){returnid;}consttemplate=get(rawTemplateData);// set first page id;if(template.length){constfirstId=template[0].id;// hope update rawPageId}// create empty page;// do create empty page, hope add new data in rawTemplateData},});
I want to get the correct data when using usePageId. What do I need to do?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to get the correct data when using usePageId. What do I need to do?
Beta Was this translation helpful? Give feedback.
All reactions