Trying to use the accounts-ui package it my React/1.3 project. Problem is, whenever I click on the ‘Create Account’ link, it reloads the entire page. I suspect that the click event on the link is getting bubbled up to the browser. Any ideas?
import { Blaze } from 'meteor/blaze'
import { Template } from 'meteor/templating'
import React from 'react'
import ReactDOM from 'react-dom'
export default class AccountsUIWrapper extends React.Component {
componentDidMount() {
// Use Meteor Blaze to render login buttons
this.view = Blaze.render(Template.loginButtons,
ReactDOM.findDOMNode(this.refs.container))
}
componentWillUnmount() {
// Clean up Blaze view
Blaze.remove(this.view)
}
render() {
return <span ref="container" />
}
}
Hey, can you be more specific? Even if you do build your own accounts package, if there’s a problem with my solution I’d like to fix it for the benefit of others.
Particularly if you can note any errors you received in the console.
Actually it turns out this wasn’t the problem at all, I think all my problems were caused by using a hotel WiFi and proxy issues. I’d solved the proxy issues, but still couldn’t login / logout with the blaze accounts UI.
However a restart of vagrant and then my whole machine got the login / logout working again.
So I never actually had the same issue, since the create account / login / logout doesn’t cause a full page refresh