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

Error received when setting Button 'as' to a SFC #2779

Closed
ryanflowers opened this issue May 9, 2018 · 2 comments
Closed

Error received when setting Button 'as' to a SFC #2779

ryanflowers opened this issue May 9, 2018 · 2 comments

Comments

@ryanflowers
Copy link
Contributor

Bug Report

The Button component assumes that the 'as' provided accepts the ref property. Stateless functional components do not support this.

Steps

In sandbox below just load it fresh with the console open to see the error which happens on first load only.

Expected Result

To error when using SFC

Actual Result

Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail.

Check the render method of Button.
in as (created by Button)
in Button (created by TestButton)
in TestButton

Version

0.77.1

Testcase

https://codesandbox.io/s/400zm5vkr7

@welcome
Copy link

welcome bot commented May 9, 2018

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@layershifter
Copy link
Member

Duplicate, see #2306.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants