f789ec5a-f20d-43c0-838d-f08e23479642
prompter
How do I use WebRTC to display the user's webcam in a React functional component?
852dde0f-0e87-4ccf-98b3-db6b5dd1f1c8
f789ec5a-f20d-43c0-838d-f08e23479642
assistant
You will need to use the `getUserMedia()` method, which is part of the WebRTC API. This method takes a `MediaStream` object as an argument, which can be used to access the user's webcam. Lastly you can use the stream in a React functional component by passing it to the `<video>` tag as a source. 

Here is an example:
```
navigator.mediaDevices.getUserMedia({ video: true, audio: false })
  .then(stream => {
    videoTag.srcObject = stream;
    videoTag.play();
  });
```