🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

react-portal-lib

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-portal-lib

``` import React, { Component } from "react"; import Portal from "./Portal";

latest
Source
npmnpm
Version
0.1.71
Version published
Maintainers
1
Created
Source

React Modal Lib

Basic Usage Example


import React, { useState } from "react";
import Modal from "react-modal-lib";

function App() {
  const [showModal, setShowModal] = useState(false);

  const handleSetShowModal = () => {
    setShowModal(!showModal);
  };

  return (
    <div>
      {showModal ? (
        <Modal>
          <h1>Hello World</h1>{" "}
          <button onClick={handleSetShowModal}>Close Modal</button>
        </Modal>
      ) : (
        <React.Fragment>
          <div>
            <h1>Hello World</h1>
            <button onClick={handleSetShowModal}>Open Modal</button>
          </div>
        </React.Fragment>
      )}
    </div>
  );
}

export default App;

react-modal-lib

Keywords

react-modal-lib

FAQs

Package last updated on 28 Oct 2019

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