Skip to content

Instantly share code, notes, and snippets.

@dkmin
Last active October 17, 2016 09:18
Show Gist options
  • Select an option

  • Save dkmin/1b21b55685d4456789bcf1b5c56e7253 to your computer and use it in GitHub Desktop.

Select an option

Save dkmin/1b21b55685d4456789bcf1b5c56e7253 to your computer and use it in GitHub Desktop.
imports/ui/AccountsUIWrapper.jsx
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Template } from 'meteor/templating';
import { Blaze } from 'meteor/blaze';
export default class AccountsUIWrapper extends 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() {
// Just render a placeholder container that will be filled in
return <span ref="container" />;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment