BREAKING CHANGE: executors are now based on context and have to be used that way
Package(s) involved
@amazeelabs/executors
Description of changes
Use Reacts built-in context for registering and retrieving operation executors.
Motivation and context
The previous approach using a global variable turned out to be unstable due to reacts asynchronous architecture and frameworks using multiple processes. Turning it into a proper context should avoid those issues.
The global variable was used to be compatible to react server components, but there is a different solution using conditional imports:
https://github.com/reactjs/rfcs/blob/main/text/0227-server-module-conventions.md#react-server-conditional-exports
BREAKING CHANGE: executors are now based on context and have to be used that way
Package(s) involved
@amazeelabs/executors
Description of changes
Use Reacts built-in context for registering and retrieving operation executors.
Motivation and context
The previous approach using a global variable turned out to be unstable due to reacts asynchronous architecture and frameworks using multiple processes. Turning it into a proper context should avoid those issues. The global variable was used to be compatible to react server components, but there is a different solution using conditional imports: https://github.com/reactjs/rfcs/blob/main/text/0227-server-module-conventions.md#react-server-conditional-exports
How has this been tested?
Unit tests