Open koresar opened 8 years ago
@koresar Yea actually it seems I had been using that react-redux-provide
in a bit wrong way, so it seems I wont need that change after all :) However it's not a bad change in my opinion, since render
method is one of key points to identify React component, might be useful to have it there.
I guess I'd like to see an example of why this change would be useful. We can already test if the stamp is a valid React component using React's test utilities.
import assert from 'assert';
import React from 'react';
import reactStamp from 'react-stamp';
import { isCompositeComponent } from 'react-addons-test-utils';
const stamp = reactStamp(React).compose({
render() {}
});
assert.ok(isCompositeComponent(stamp()));
@troutowicz You are describing a case when you actually have component instance. However there are other modules (eg. react-redux-provide) that wants to check if given class is component by inspecting its prototype.
Some modules check if
FooComponent.prototype.render
exists. More info can be provided by @FredyCThis is just a sample change. @troutowicz please review.