-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
useCallback received a final argument... #41
Comments
Interesting. I couldn’t replicate the bug locally yet. Could you make a code sandbox with this bug so I can debug it?
Tanner Linsley
…On Oct 10, 2019, 2:16 AM -0600, Alexey Ulyanov ***@***.***>, wrote:
I get this error when include a Chart component into my project.
useCallback received a final argument that is not an array (instead, received `function`). When specified, the final argument must be an array.
function MyChart(){
const data = React.useMemo(
() => [
{
label: "Series 1",
data: [[0, 1], [1, 2], [2, 4], [3, 2], [4, 7]]
},
{
label: "Series 2",
data: [[0, 3], [1, 1], [2, 5], [3, 6], [4, 4]]
}
],
[]
);
const series = React.useMemo(
() => ({
showPoints: false
}),
[]
);
const axes = React.useMemo(
() => [
{ primary: true, type: "linear", position: "bottom" },
{ type: "linear", position: "left" }
],
[]
);
return (
<div
style={{
width: "400px",
height: "300px"
}}
>
<Chart data={data} series={series} axes={axes} tooltip />
</div>
)
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I've managed to reproduce it with this React version |
i have the exact same issue, react 16.10.2 and react-charts 2.0.0-beta.4 |
having the same issue.. react 16.11.0 and react-charts 2.0.0-beta.4 :/ |
I am having the same issue. "react": "16.12.0", "react-charts": "2.0.0-beta.4" |
having the same issue. "react": "^16.12.0", "react-charts": "^2.0.0-beta.4", |
The error stack shows it's an issue in here:
indeed |
Beta doesn't even use this API/function any more, so I'm going to close this. |
I get this error when include a Chart component into my project.
The text was updated successfully, but these errors were encountered: