Working on refactoring to support router use case

This commit is contained in:
Max Lynch
2020-12-30 13:19:31 -06:00
parent 3fe67d30b3
commit 29ae24c6a6
11 changed files with 172 additions and 145 deletions
+12
View File
@@ -0,0 +1,12 @@
import { useEffect } from 'react';
import Store from '../store';
const usePage = fields => {
useEffect(() => {
Store.update(s => {
s.currentPage = fields;
});
}, [fields]);
};
export default usePage;