react modal close automatically and open another code example

Example 1: modal form bootstrap





Example 2: modal reactjs template

import React, { Component } from 'react';
import Modal from 'react-awesome-modal';

export default class Examples extends Component {
    constructor(props) {
        super(props);
        this.state = {
            visible : false
        }
    }

    openModal() {
        this.setState({
            visible : true
        });
    }

    closeModal() {
        this.setState({
            visible : false
        });
    }

    render() {
        return (
            

React-Modal Examples

this.openModal()} /> this.closeModal()} >

Title

Some Contents

this.closeModal()}>Close
); } }

Tags:

Misc Example