🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@libreform/react-component

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libreform/react-component

React component for WP Libre Form

Source
npmnpm
Version
2.0.0-beta.3
Version published
Weekly downloads
2
-81.82%
Maintainers
2
Weekly downloads
 
Created
Source

React component for WP Libre Form

Travis npm package

React component for WP Libre Form. Depends on @libreform/libreform, which is NOT bundled with the package, you have to install it yourself.

Installation

npm install @libreform/react-component-libre-form

Usage

Like any other component. Should work just like WPLF works without React. If you need access to the dom node, you can create a ref with useRef() and pass it into the component as property.

import LibreForm from '@libreform/react-component'

function Demo() {
  const ref = useRef(null)

  return <div>
    <h1>Demo</h1>
    <LibreForm form="form-slug" ref={ref} className="myClassName" IfErrors={YourErrorComponent} WhileLoading{YourLoadingComponent} />
  </div>
}

Gotchas

This is just a dangerouslySetInnerHTML wrapper & bindings for WPLF. There's no sanitation. You should know the risks of unrestricted HTML.

Keywords

react-component

FAQs

Package last updated on 17 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts