Submitted
SimpleUi & API to get good advices. Built w/ SvelteKit & TailwindCss.
@AntoineC-dev
Design comparison
Solution retrospective
Hello everyone. With this project i discovered svelte Endpoint system however i am having a hard time finding a really good explanation on all the more complicated API methods (POST, PATCH, etc...). The docs is not so clear on that matter. So if you have some good ressources please share it with me it would be very kind. Also i search for a way to make the transition between two sentence of a really different lenght more smooth since it will kind of "jump" sometimes is it goes like from 5 words to 20+.
Feel free to share any suggestions & advices on the project.
Have a nice day/night. Peace
Edit:
I had to update the cache options for the fetch API to get a new quote w/ each API call.
The cache: "no-cache"
does the trick
const getRandomAdvice = async () => {
return (await (await fetch("https://api.adviceslip.com/advice", { cache: "no-cache" })).json()) as Slip<Advice>;
};
Community feedback
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord