Skip to content

victorbadaro/react-modal-portal-example

Repository files navigation

react-modal-portal-example

LEIAME.md

Click here to access the demo website 🙂

Summary

🧾 About

This is just an example of how to use portals to render a modal in React.

You'll see the DOM like this (before rendering the modal):
image

...and then (after rendering the modal):
image

🚀 Main technologies

(You can see all the dependencies in the package.json file)

💻 Usage

  1. Clone the project (you'll need a personal access token):

    $ git clone https://github.com/victorbadaro/react-modal-portal-example
  2. Access its directory:

    $ cd react-modal-portal-example
  3. Install its dependencies:

    $ yarn
    # feel free to use another package manager, but you might want use yarn once there's already a yarn.lock file in the root directory
  4. Start the server by running the dev script:

    $ yarn dev

This project was created and developed with ❤ by Victor Badaró