Skip to content

Instantly share code, notes, and snippets.

@nataliaconde
Created February 20, 2023 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nataliaconde/2bfa2fb4fbf76beef7e49e6c0413886a to your computer and use it in GitHub Desktop.
Save nataliaconde/2bfa2fb4fbf76beef7e49e6c0413886a to your computer and use it in GitHub Desktop.
// pages/add.js
export default function Add() {
const storeAddTask = useGlobalStore((state) => state.addTask);
const handleSubmit = () => {
storeAddTask({
title: title,
description: description,
isDone: isDone,
});
router.push("/");
}
// ...
}
// Your final file should look like this:
// https://github.com/duplxey/back4app-containers-nextjs/blob/master/pages/add.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment