carlsverre / react-outlet

Bottom-up Transclusion for React
MIT License
71 stars 12 forks source link

<Outlet> component has typo in componentWillReceiveProps #7

Closed heygrady closed 7 years ago

heygrady commented 7 years ago

react-outlet has a typo in it.

https://github.com/carlsverre/react-outlet/blob/master/src/outlet_registry.js#28

OutletRegistry.prototype.unregister_outlet = function(outlet_id) {
    // ...
};

https://github.com/carlsverre/react-outlet/blob/master/src/outlet.js#L24

    componentWillReceiveProps: function(next_props) {
        if (this.props.outletId !== next_props.outletId) {
            registry.unregister(this.props.outletId); // <-- should be `unregister_outlet`
            registry.register(next_props.outletId, this.update);
        }
    }