mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
1. add test (and fix) using context fixture with mount 2. add test for innerText that was failing prior to https://github.com/microsoft/playwright/pull/14008
10 lines
284 B
TypeScript
10 lines
284 B
TypeScript
import React, { useEffect, useState } from 'react';
|
|
|
|
export const Fetch: React.FC<{ url: string }> = ({ url }) => {
|
|
const [data, setData] = useState('no response yet');
|
|
useEffect(() => {
|
|
fetch(url).then(res => res.text()).then(setData);
|
|
}, [url]);
|
|
return <p>{data}</p>;
|
|
}
|