0.1.7 • Published 11 months ago

@brease/react v0.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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

0.1.0

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.7

11 months ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.6

12 months ago

0.1.5

1 year ago

0.0.2

2 years ago

0.0.1

2 years ago