-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
import { render, Fragment } from "preact"; import { useErrorBoundary, useEffect } from "preact/hooks"; const MaybeText = ({ children }) => { if (Math.random() > 0.5) { return children; } throw new Error("Unable to display the text."); }; const Main = () => { const [error, resetError] = useErrorBoundary(); useEffect(() => { if (error) { fetch("https://sentry.io", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ message: error.message }) }); } }, [error]); if (error) { return (
Errorh1>
An error occurred.p> Reason: {error.message}small> Try againbutton> Fragment> ); } return (
Mainh1>
This is the main component.p> Maybe this will be printed?MaybeText> Fragment> ); }; const root = document.getElementById("root"); if (root) { render(
, root); }
Preact is a great alternative to React. It is made for creating modern Web Application and weights a ton less than a React application.
Preact is a great alternative to React. It is made for creating modern Web Application and weights a ton less than a React application.