Nivo: TypeError: Object(...) is not a function

Created on 14 May 2019  Â·  3Comments  Â·  Source: plouc/nivo

Screen Shot 2019-05-14 at 1 25 14 PM

When I use following code, exactly copied from the examples I get above error

const USER_REG_MOCK_DATA=[
    {
        "day": "2016-12-08",
        "value": 214
    },
    {
        "day": "2016-04-23",
        "value": 81
    },
    {
        "day": "2015-11-09",
        "value": 395
    },
    {
        "day": "2017-12-07",
        "value": 300
    },
    {
        "day": "2017-11-15",
        "value": 13
    },
    {
        "day": "2015-04-23",
        "value": 386
    },
    {
        "day": "2018-08-06",
        "value": 168
    },
   ...
]

<ResponsiveCalendar
                                    data={USER_REG_MOCK_DATA}
                                    from="2015-03-01"
                                    to="2016-07-12"
                                    emptyColor="#eeeeee"
                                    colors={[ '#61cdbb', '#97e3d5', '#e8c1a0', '#f47560' ]}
                                    margin={{ top: 40, right: 40, bottom: 40, left: 40 }}
                                    yearSpacing={40}
                                    monthBorderColor="#ffffff"
                                    dayBorderWidth={2}
                                    dayBorderColor="#ffffff"
                                    legends={[
                                        {
                                            anchor: 'bottom-right',
                                            direction: 'row',
                                            translateY: 36,
                                            itemCount: 4,
                                            itemWidth: 42,
                                            itemHeight: 36,
                                            itemsSpacing: 14,
                                            itemDirection: 'right-to-left'
                                        }
                                    ]}
                                />
awaiting feedback invalid

Most helpful comment

Sorry. Acutally it was gone after I've updated react to 16.8. Not a nivo bug. Thanks

All 3 comments

Please reproduce this issue on codesandbox as asked in the ISSUE TEMPLATE, thank you.
I don't know which version of React/nivo… you're using, browser, context…

Sorry. Acutally it was gone after I've updated react to 16.8. Not a nivo bug. Thanks

So memo() wasn't available.

Was this page helpful?
0 / 5 - 0 ratings