Skip to content

How to display a pop up for the first time user visit in a react application? #12259

@CodHands

Description

@CodHands

How do I make a first visit popup for my react application? Is it possible to implement using the react-popup module? I used this module below but it does not seem to work. Can you check and let me know what wrong here.

Below is my homepage component

import React, {Component} from 'react';
import './HomePage.css';
import Carousel from 'nuka-carousel';
import HeaderComponent from '../../components/Header/Header.js';
import {Decorators} from './decorators.js';
import Popup from 'react-popup'

export default class HomePage extends Component {
redirectPage = () => {
window.location = '#/dashboard';
}

componentWillMount(){
Popup.alert('my component')
}

render() {
var mixins = [Carousel.ControllerMixin];
return ( //Component Carousel);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions