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

Enable null return values in plain functions #5884

Merged
merged 1 commit into from
Jan 29, 2016

Conversation

jimfb
Copy link
Contributor

@jimfb jimfb commented Jan 19, 2016

Enable null return values in plain functions by removing support for inheritless classes, as per #5355.

@jimfb jimfb added this to the 0.15 milestone Jan 19, 2016
@sebmarkbage sebmarkbage mentioned this pull request Jan 19, 2016
7 tasks
@jimfb jimfb force-pushed the component-extends-react-component branch from d8ef46a to d32aee5 Compare January 19, 2016 21:42
@jimfb
Copy link
Contributor Author

jimfb commented Jan 20, 2016

@sebmarkbage @spicyj


it('should allow simple functions to return false', function() {
function Child() {
return null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false

@jimfb jimfb force-pushed the component-extends-react-component branch from d32aee5 to 757756f Compare January 20, 2016 22:11
@facebook-github-bot
Copy link

@jimfb updated the pull request.

@jquense
Copy link
Contributor

jquense commented Jan 29, 2016

🙌

@jimfb
Copy link
Contributor Author

jimfb commented Jan 29, 2016

Ping @sebmarkbage @spicyj

@sophiebits
Copy link
Collaborator

I thought I reviewed this already. 👍

jimfb added a commit that referenced this pull request Jan 29, 2016
Enable null return values in plain functions
@jimfb jimfb merged commit 188e8cd into facebook:master Jan 29, 2016
@martiros
Copy link

👍

afc163 added a commit to react-component/table that referenced this pull request Aug 2, 2016
gaearon added a commit to gaearon/react that referenced this pull request Dec 28, 2016
This test is identical to "should warn when stateless component returns array" earlier.

It was moved from another file in facebook#5884 so it likely survived by accident.
gaearon added a commit to gaearon/react that referenced this pull request Dec 28, 2016
We have an invariant that checks the same case right afterwards.

The warning was originally added in facebook#5884 with a distinct wording.

However it was later changed to the same wording as the invariant in facebook#6008.

I don't see why we would want to have both since they're saying the same thing and with (almost) the same internal stack.
acdlite pushed a commit to acdlite/react that referenced this pull request Jan 12, 2017
This test is identical to "should warn when stateless component returns array" earlier.

It was moved from another file in facebook#5884 so it likely survived by accident.
acdlite pushed a commit to acdlite/react that referenced this pull request Jan 12, 2017
We have an invariant that checks the same case right afterwards.

The warning was originally added in facebook#5884 with a distinct wording.

However it was later changed to the same wording as the invariant in facebook#6008.

I don't see why we would want to have both since they're saying the same thing and with (almost) the same internal stack.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants