currentReactRuntime top-level property

ReactRuntime get currentReactRuntime

Implementation

ReactRuntime get currentReactRuntime {
  final runtime = Zone.current[_reactRuntimeKey];
  if (runtime is ReactRuntime) return runtime;
  if (_globalRuntime != null) return _globalRuntime!;
  throw StateError('No ReactRuntime is active.');
}