-
Notifications
You must be signed in to change notification settings - Fork 17
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
Errors when trying to use inside React JSX #11
Comments
I have found and removed these assertions that somehow were in the package, perhaps by mistake: https://github.com/yoshuawuyts/nanocomponent-adapters/blob/master/react.js#L6-L7 Now there is real error though: warning.js:36Warning: A Component: React.createClass is deprecated and will be removed in version 16. Use plain JavaScript classes instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement.printWarning @ warning.js:36warning @ warning.js:60ReactClass.createClass @ ReactClass.js:628toReact @ react.js:11(anonymous function) @ App.js:19__webpack_require__ @ bootstrap d183399…:555fn @ bootstrap d183399…:86(anonymous function) @ index.js:3__webpack_require__ @ bootstrap d183399…:555fn @ bootstrap d183399…:86(anonymous function) @ bootstrap d183399…:578__webpack_require__ @ bootstrap d183399…:555(anonymous function) @ bootstrap d183399…:578(anonymous function) @ bootstrap d183399…:578
react.js:21Uncaught TypeError: component is not a function The screen elements are back, but not the button. |
yeah we should probs switch to prototypes for this, and update to latest
nanocomponent. haha
…On Sun, May 7, 2017 at 10:32 AM Dmitri Zaitsev ***@***.***> wrote:
I have found and removed these assertions that somehow were in the
package, perhaps by mistake:
https://github.com/yoshuawuyts/nanocomponent-adapters/blob/master/react.js#L6-L7
Now there is real error though:
warning.js:36Warning: A Component: React.createClass is deprecated and will be removed in version 16. Use plain JavaScript classes instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement.printWarning @ warning.js:36warning @ warning.js:60ReactClass.createClass @ ReactClass.js:628toReact @ react.js:11(anonymous function) @ App.js:19__webpack_require__ @ bootstrap d183399…:555fn @ bootstrap d183399…:86(anonymous function) @ index.js:3__webpack_require__ @ bootstrap d183399…:555fn @ bootstrap d183399…:86(anonymous function) @ bootstrap d183399…:578__webpack_require__ @ bootstrap d183399…:555(anonymous function) @ bootstrap d183399…:578(anonymous function) @ bootstrap d183399…:578react.js:21Uncaught TypeError: component is not a function
The screen elements are back, but not the button.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACWlet86dDdFtRF9IajhVo3LEXe7mKYbks5r3YG2gaJpZM4NTDnQ>
.
|
We could also use the create-class shim... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce:
then copy the
React
example inside theApp.js
file,uncomment
ReactDOM.render(<Button />, mountNode)
,instead trying to put
<Button />
directly inside the JSX.Complained about undefined
html
, so I had added this line:The error changed to
assert.js:59Uncaught AssertionError: nanocomponent-adapters/react: component should be type function
in the console and the screen is empty.
The text was updated successfully, but these errors were encountered: