Skip to content

TypeError: Cannot set property x of undefined #20

@alldentobias

Description

@alldentobias

I believe the new update of react scripts may have broken this package
My code

    <Button
    onClick={() => scrollToComponent(this.Description, {offset: 0, align: 'top',duration: 1200})}>
    </Button>

...
<section className='description' ref={(section) => { this.Description = section; }}>
  <Description />
  </section>

Yields TypeError: Cannot set property 'Description' of undefined on start. Worked fine before updating to the latest version of react-scripts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions