Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you add a Page example? #5

Open
michelem09 opened this issue Aug 14, 2019 · 1 comment
Open

Could you add a Page example? #5

michelem09 opened this issue Aug 14, 2019 · 1 comment

Comments

@michelem09
Copy link
Contributor

Hello, I'm having some problems to create the after sign-in page <Page path="/home"> I did something like this, but I'm receiving lot of console errors.

import React, { Component } from 'react';

export class Page extends Component {

    constructor(props) {
        super(props);

        this._validAuthStates = ['signedIn'];
    }

    render() {
        return (
            <div>
                Welcome...
            </div>
        );
    }
}

@GoPro16
Copy link
Member

GoPro16 commented Aug 14, 2019

You don't have to worry about validAuthStates once you are inside the children of the router. From there on the @reach/router kicks in a works just like a standard router.

I do plan on switching back to react-router-dom as reach is unmaintained since October 2018.

I am not sure however, about the errors popping up. They also occur on my apps and I haven't had time to find documentation around the issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants