Skip to content

non-optimal function bindings at Nav component #879

Closed
@nik72619c

Description

@nik72619c

Nature of issue?

  • Found a bug

Details about the bug:

The functions inside the class components like Nav.jsx are bound inside the render function which should not be done since this is gonna make react use reconciliation and cause a re-render, as it would find a new instance of this function every time. So this must be corrected in order to prevent any optimisation issues.

  • Web browser and version: Version 72.0.3626.121 (Official Build) (64-bit)
  • Operating System: Windows 10

Steps to reproduce this bug:
Not actually a bug but a performance enhancement
add a console.log inside the render method of nav.jsx and cause a re-render

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions