The app makes heavy use of Redux Toolkit, its Query library, and nanostores
.
TODO
nanostores
nanostores is a tiny state management library. It provides both imperative and declarative APIs.
export const $myStringOption = atom<string | null>(null);
// Outside a component, or within a callback for performance-critical logic
$myStringOption.get();
$myStringOption.set('new value');
// Inside a component
const myStringOption = useStore($myStringOption);
invokeai/frontend/web/src/app/store/nanostores/
.invokeai/frontend/web/src/features/myFeature/myFeatureNanostores.ts
).nanostores
instead of a global.nanostores
instead of redux.nanostores
if there’s a measurable performance issue.