Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
frontend ruleP2stack specificStack: react
reduxactionsconventionsfsa
Put non-domain action fields under a meta key
Follow the Flux Standard Action convention: keep the action's domain data in payload and put cross-cutting fields (like persistence hints) under meta, rather than mixing them at the top level.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetypescript
| 1 | { type: 'PERSIST_CHANNELS', channelIds, persist: true, key: 'channels' } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | { type: 'PERSIST_CHANNELS', payload: channelIds, meta: { persist: true, key: 'channels' } } |
Explanation (EN)
Objašnjenje (HR)