score:2

Accepted answer
....
const ourPostContent = storeMethods().ourPostContent;
const { createPost } = storeMethods();
const onSubmit = (e: any) => {
    e.preventDefault();
    const postData = { ourTitle, ourPostContent };
    console.log(postData);
    createPost(postData);
};

Related Query

More Query from same tag