-
-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
π Bug report
Current Behavior
I took your Next.js example and tweaked it a little bit:
import { useAsync } from "react-use";
import { FormiumForm, defaultComponents } from "@formium/react";
import Spinner from "components/spinner";
import Error from "components/error";
import { formium } from "lib/formium";
const Form = ({ slug, preview = false }) => {
const { loading, error, value: form } = useAsync(async () => {
return formium.getFormBySlug(slug /* , previewData*/);
}, [slug]);
if (loading) {
return <Spinner />;
}
if (error) {
return <Error message={error.message} />;
}
console.log(form);
...
// other-component.js
<Form slug={"feedback"} />
But this outputs only {id: "603c6679edd5310001df6688"}
.
Expected behavior
I expect the full JSON describing the form.
Additional context
It works when I use @formium/cli
.
Your environment
Software | Version(s) |
---|---|
Formium | "@formium/client": "0.1.3" "@formium/react": "0.1.3" |
React | 17.0.1 |
TypeScript | - |
Browser | Latest Chrome Canary |
npm/Yarn | npm 6.14.10 |
Operating System | macOS 11.2.2 |
Metadata
Metadata
Assignees
Labels
No labels