context property

  1. @experimental
  2. @Deprecated('This legacy, unstable context API is only supported in the deprecated Component, and not Component2.' ' Instead, use Component2.context, Context.Consumer, or useContext.')
dynamic context
inherited

The React context map of this component, passed down from its ancestors' getChildContext value.

Only keys declared in this component's contextKeys will be present.

This API was never stable in any version of ReactJS, and was replaced with a new, incompatible context API in ReactJS 16.

Implementation

@experimental
@Deprecated('This legacy, unstable context API is only supported in the deprecated Component, and not Component2.'
    ' Instead, use Component2.context, Context.Consumer, or useContext.')
dynamic get context => _context;
  1. @experimental
  2. @Deprecated('This legacy, unstable context API is only supported in the deprecated Component, and not Component2.' ' Instead, use Component2.context, Context.Consumer, or useContext.')
void context=(dynamic value)
inherited

This API was never stable in any version of ReactJS, and was replaced with a new, incompatible context API in ReactJS 16.

Implementation

@experimental
@Deprecated('This legacy, unstable context API is only supported in the deprecated Component, and not Component2.'
    ' Instead, use Component2.context, Context.Consumer, or useContext.')
set context(dynamic value) => _context = value as Map;