App reviews, troubleshooting, and recommendations
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I am trying to send the data from a form that I have in my app.jsx to a function within server.js, when I execute the function I get an error saying that it is not a function, I also did a test calling a function with "hello world" with the same result
app.admin.jsx
import { Test } from '../models/superMark.server';
async function handleSubmit(event) {
event.preventDefault();
const test = Test();
console.log(test);
}
superMark.server.js
export function Test() {
return "Hello world";
}
And I get app.admin.jsx:64 Uncaught (in promise) TypeError: (0 , import_superMark.Test) is not a function