Note: this is template slightly outdated and will be updated as soon as possible.
-
Press
Use this template
button. -
Clone it, install and run:
yarn install
yarn start
- Use
import {} from "effector-root"
instead of"effector"
. All units should be created in the root domain. - Use
createStart
,withStart
anduseStart
frompage-routing.ts
for pages start events.
https://sova.dev/application-structure
src/server.tsx
— Express server, that renders React to streamsrc/index.tsx
— Node.js entry point, that have hot module replacement and imports serversrc/client.tsx
— Browser side entry point, that hydrates stores and react appsrc/application.tsx
— Application component, that have global styles and effector providersrc/pages/index.tsx
— Pages componentsrc/pages/routes.ts
— Static routes configsrc/pages/:page-name/index.tsx
— View for single specific pagesrc/pages/:page-name/model.ts
— Business-logic for specific page, that contains single level logic layersrc/lib
— Internal librariessrc/lib/effector
— START event name to use as page property