hunk.code_window: />
   ## Usage
   You should refer to the [react-native-webview docs](https://github.com/react-native-community/react-native-webview/blob/master/docs/Guide.mdx#react-native-webview-guide) for more information on the API and its usage. But the following example (courtesy of that repo) is a quick way to get up and running!
   <SnackInline label="Basic Webview usage" dependencies={["react-native-webview", "expo-constants"]}>
   {/* prettier-ignore */}
   ```jsx
  
hunk.labels: keep keep keep keep replace keep keep keep keep keep
hunk.after_edit: You should refer to the [react-native-webview docs](https://github.com/react-native-community/react-native-webview/blob/master/docs/Guide.md#react-native-webview-guide) for more information on the API and its usage. But the following example (courtesy of that repo) is a quick way to get up and running!
  
hunk.file_path: docs/pages/versions/v44.0.0/sdk/webview.mdx
hunk.type: replace
file: /*
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  
  #import <ABI46_0_0React/ABI46_0_0RCTComponentViewRegistry.h>
  #import <ABI46_0_0React/ABI46_0_0RCTViewComponentView.h>
  #import <XCTest/XCTest.h>
  
  @interface ABI46_0_0RCTComponentViewRegistryTests : XCTestCase
  @end
  
  using namespace ABI46_0_0facebook::ABI46_0_0React;
  
  @implementation ABI46_0_0RCTComponentViewRegistryTests {
    ABI46_0_0RCTComponentViewRegistry *_componentViewRegistry;
  }
  
  - (void)setUp
  {
    [super setUp];
    _componentViewRegistry = [ABI46_0_0RCTComponentViewRegistry new];
  }
  
  - (void)testComponentViewDescriptorWithTag
  {
    XCTAssertThrows(
        ^{
          Tag nonExistingTag = 12;
          [self->_componentViewRegistry componentViewDescriptorWithTag:nonExistingTag];
        }(),
        @"Should throw: `Attempt to query unregistered component`");
  
    Tag existingTag = 2;
    auto newViewDescriptor = [_componentViewRegistry
        dequeueComponentViewWithComponentHandle:[ABI46_0_0RCTViewComponentView componentDescriptorProvider].handle
                                            tag:existingTag];
  
    XCTAssertNoThrow(^{
      auto componentDescriptor = [self->_componentViewRegistry componentViewDescriptorWithTag:existingTag];
      XCTAssertEqual(newViewDescriptor, componentDescriptor);
    }());
  }
  
  - (void)testFindComponentViewWithTag
  {
    Tag nonExistingTag = 12;
    XCTAssertNil([_componentViewRegistry findComponentViewWithTag:nonExistingTag]);
  
    Tag existingTag = 2;
    auto newViewDescriptor = [_componentViewRegistry
        dequeueComponentViewWithComponentHandle:[ABI46_0_0RCTViewComponentView componentDescriptorProvider].handle
                                            tag:existingTag];
  
    XCTAssertEqual(newViewDescriptor.view, [_componentViewRegistry findComponentViewWithTag:existingTag]);
  }
  
  - (void)testDequeueAndEnqueue
  {
    Tag existingTag = 2;
    auto newViewDescriptor = [_componentViewRegistry
        dequeueComponentViewWithComponentHandle:[ABI46_0_0RCTViewComponentView componentDescriptorProvider].handle
                                            tag:existingTag];
  
    XCTAssertThrows(
        ^{
          [self->_componentViewRegistry
              dequeueComponentViewWithComponentHandle:[ABI46_0_0RCTViewComponentView componentDescriptorProvider].handle
                                                  tag:existingTag];
        }(),
        @"Should throw: `Attempt to dequeue already registered component`");
  
    XCTAssertThrows(
        ^{
          Tag nonExistingTag = 12;
          [self->_componentViewRegistry
              enqueueComponentViewWithComponentHandle:[ABI46_0_0RCTViewComponentView componentDescriptorProvider].handle
                                                  tag:nonExistingTag
                              componentViewDescriptor:newViewDescriptor];
        }(),
        @"Should throw: `Attempt to enqueue unregistered component`");
  }
  
  @end
  