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

publish a component written by hooks to npm, but report Minified React error #321 #17014

Closed
lizhongzhen11 opened this issue Oct 4, 2019 · 1 comment

Comments

@lizhongzhen11
Copy link

lizhongzhen11 commented Oct 4, 2019

Do you want to request a feature or report a bug?
no.
What is the current behavior?
look this: react-week-time-range-picker.

This is a component written by react hooks. I run it normal when i develop it. However, when i npm install react-week-time-range-picker to test , the page report error Minified React error #321;visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

I look for the solution almost two days, but i failed.

  1. My version is no problem
  2. I think the hooks call is correct
  3. I doubt it may be the third cause in the official documents,but i test it with official documents code, it print true。

Now, i am muddled.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:

What is the expected behavior?
I hope who can help me

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

{
  "react": "^16.10.2",
  "react-dom": "^16.10.2"
}

chrome 77.

Thank you!

@lizhongzhen11
Copy link
Author

OK,i found the solution.
in 16029

Thank you!

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

No branches or pull requests

1 participant