-
Couldn't load subscription status.
- Fork 0
React Hooks Considarations
By default, the registered services use the singleton option enabled. This might cause conflict with native React hooks
that utilize the component state, because with the singleton option enabled, the container will always return the same
instance of the service. To disable, use the singleton option.
container.add('useCustomHook', () => useCustomHook(), {
singleton: false
});This disables the singleton option for the service's
get()method. An equivalent way to disable the singleton option is to use thegetFactory()method instead, which always returns a new instance of the service without the need to disable the singleton option.
We welcome contributions from the community! Whether it's reporting a bug, suggesting a feature, or contributing code, your involvement is key to making Packet.js better. Please check out this section for more details.
If you encounter any issues or bugs while using packetjs, or if you have any feature requests, please feel free to
open an issue in our GitHub repository. You can report issues, track progress, and engage in discussions with the
community via the following link:
If you have any questions or need further assistance, feel free to reach out via the discussion board.