fetch("https://baconipsum.com/api/?type=meat-and-filler", )
.then((response) => {
if (response.status !== 200) {
return Promise.reject();
}
return response.json();
})
.then(res => console.log("res", res))
state.token = res
Note:
These methods are considered legacy and you should avoid them in new code:
UNSAFE_componentWillMount()
<Route path="invoices" element={<Invoices />}>
<Route path=":invoiceId" element={<Invoice />} />
</Route>
<Link
style={{ display: "block", margin: "1rem 0" }}
to={`/invoices/${invoice.number}`}
key={invoice.number}
>
{invoice.name}
</Link>
import { useParams } from "react-router-dom";
export default function Invoice() {
let params = useParams();
return <h2>Invoice: {params.invoiceId}</h2>;
}
install @angular/core, @angular/common, @angular/forms, @angular/platform-browser, quill v1.x, @types/quill v1.x and rxjs - peer dependencies of ngx-quill