Skip to content

Instantly share code, notes, and snippets.

View vikaswakde's full-sized avatar
🎯
Focusing

Vikas Wakde vikaswakde

🎯
Focusing
View GitHub Profile
this is the button component hidden by default, it trigggers when user loads the webpage,
it triggers api endpoint /api/create-posts/ with POST request
const CreatePostsButton = () => {
// trigger post request, every time you refresh the page
useEffect(() => {
handleCreatePosts();
}, []);