🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@brease/react

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brease/react

Hooks and headless client library for managing and executing business rules in domain contexts.

latest
Source
npmnpm
Version
0.2.3
Version published
Maintainers
2
Created
Source

Multiple contexts

## Different contexts Each context and their execution is scoped to its own store. You can use as many different contexts in parallel as you need. For example:

const { result: order } = useRules("checkout", user);
const { result: order } = useRules("colors", user);

Same context for multiple objects

If you have to run business rules for multiple objects of a context, you must add a distinct identifier:

const { result: order1 } = useRules("checkout", user1, { objectID: "u1" });
const { result: order2 } = useRules("checkout", user2, { objectID: "u2" });

Otherwise both order1 and order2 end up share the refer to user2 with applied actions. They would use the same rules store and the last execution wins. https://dotindustries.notion.site/Type-inheritance-0ac344df4a6c4821870c3fd6b374d0ed

FAQs

Package last updated on 13 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts