Answer the question
In order to leave comments, you need to log in
Why does React VK MINI APP send three unnecessary requests on startup?
The code:
const Home = ({id}) =>
{
const [clicks, setClicks] = useState("")
var urlencoded = new URLSearchParams();
urlencoded.append("clicks", "1");
fetch(`/example`,{
method: "POST",
body: urlencoded,
headers: {
"Content-Type": "application/x-www-form-urlencoded"
}
})
return (
<>
<Panel id="panel">
<Div>
<Button onClick={setClicks}>example</Button>
<Text weight="medium" style={{marginLeft:256}}>
qq
</Text>
</Div>
</Panel>
</>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question