Skip to content

Can pages, widgets has own stores for business logic? #731

Answered by illright
dante01yoon asked this question in Q&A
Discussion options

You must be logged in to vote

Widgets and pages certainly can have business logic and stores — there's no rule that forbids it.

However, usually, pages are not the right scope for a store. A store is usually global (used on several pages) or local to a certain component, so it might just be placed next to that component.

You can certainly start by having a model segment on a page, and maybe later move it to another layer if the project requirements need it

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dante01yoon
Comment options

Answer selected by dante01yoon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants