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

Login form disappear on update #7

Open
yanickrochon opened this issue Jul 30, 2016 · 2 comments
Open

Login form disappear on update #7

yanickrochon opened this issue Jul 30, 2016 · 2 comments

Comments

@yanickrochon
Copy link

Using [email protected]+, and std:[email protected], have have this route set up

FlowRouter.route("/login", {
  action() {
    mount(LoginLayout, {
      loginForm: <Accounts.ui.LoginForm />
    });
  }
});

And whenever the URI changes (say adding #foo), the route's action gets executed again, but the loginForm is not rendered anymore.

@fIa5h
Copy link

fIa5h commented Aug 19, 2016

+1

@fIa5h
Copy link

fIa5h commented Aug 19, 2016

@yanickrochon what does your entire routes.jsx file look like? Is this happening when you're passing it to nested routes? If so, try re-rendering the form like so:

var authenitcatedRoutes = FlowRouter.group({prefix: "/app", name: "app"});

// handling /app
authenitcatedRoutes.route('/', {
    name: 'app',
    action: function() {
        mount(App, {
            content: () => (
                <Page userControls={< Accounts.ui.LoginForm />}/>
            )
        });
    }
});

// handling /app/anotherPage
authenitcatedRoutes.route('/anotherPage', {
    name: 'app.anotherPage',
    action: function() {
        mount(App, {
            content: () => (
                <AnotherPage userControls={< Accounts.ui.LoginForm />}/>
            )
        });
    }
});

Also, you have import React from 'react' in your routes.jsx and have npm installed react-dom?

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