Modernize how we use React contexts (#3359)
* Replace useContext with use The docs recommend the use hook because it is simpler and allows itself to be called conditionally. * Simplify our context providers React 19 lets you omit the '.Provider' bit.
This commit is contained in:
@@ -149,7 +149,7 @@ function createGroupCallView(
|
||||
const { getByText } = render(
|
||||
<BrowserRouter>
|
||||
<TooltipProvider>
|
||||
<MediaDevicesContext.Provider value={mockMediaDevices({})}>
|
||||
<MediaDevicesContext value={mockMediaDevices({})}>
|
||||
<ProcessorProvider>
|
||||
<GroupCallView
|
||||
client={client}
|
||||
@@ -164,7 +164,7 @@ function createGroupCallView(
|
||||
widget={widget}
|
||||
/>
|
||||
</ProcessorProvider>
|
||||
</MediaDevicesContext.Provider>
|
||||
</MediaDevicesContext>
|
||||
</TooltipProvider>
|
||||
</BrowserRouter>,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user