The observer()
Higher-Order Component (HOC) is used to make React components reactive to changes in TeamPlay signals.
Component
: The React component to be made reactive.Returns a new component that is reactive to TeamPlay signals.
Reactivity: Components wrapped with observer()
will automatically re-render when any TeamPlay signal they use changes.
Suspense Integration: observer()
automatically wraps the component in a Suspense boundary, handling loading states for asynchronous operations.
observer()
to ensure they update when data changes.observer()
optimizes re-renders by only updating when the specific data used in the component changes.