import React from 'react' import PropTypes from 'prop-types' import Link from 'next/link' class About extends React.Component { static pageTransitionDelayEnter = true constructor (props) { super(props) this.state = { loaded: false } } componentDidMount () { this.timeoutId = setTimeout(() => { this.props.pageTransitionReadyToEnter() this.setState({ loaded: true }) }, 2000) } componentWillUnmount () { if (this.timeoutId) clearTimeout(this.timeoutId) } render () { if (!this.state.loaded) return null return (
Notice how a loading spinner showed up while my content was "loading"? Pretty neat, huh?
Go back home