toshi1127 / react-formrun

Easy to use formrun with React Hooks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-slim-use-form

Easy to use formrun with React Hooks.

How to install

npm install react-formrun or yarn add react-formrun

How to use

import React from "react";
import { useFormrun } from "react-formrun";

type Props = {
  data?: [];
};

export const Example: React.FC<Props> = ({ data }) => {
  const { initFormrun, getFormrun } = useFormrun(
    { className: ".formrun-embed", type: "embed" },
    [data]
  );
  useFormrun({ className: ".formrun", type: "default" });

  initFormrun()
  const formrun = getFormrun()
  formrun?._formViews

  return (
    <div
      className="formrun-embed"
      data-formrun-form={`@hoge`}
      data-formrun-redirect="true"
    />
  );
};

About

Easy to use formrun with React Hooks.


Languages

Language:TypeScript 100.0%