Skip to content

Use ReactNode import instead of React.ReactNode in ScrollToTop #30

@MohamadSalman11

Description

@MohamadSalman11

Before You Submit

Describe the issue

The ScrollToTop component currently types children as React.ReactNode. This can be simplified by importing ReactNode directly from react and using it in the props type.

Goal:

  • Import ReactNode from react.
  • Replace React.ReactNode with ReactNode in the component props.

Import:

import { ReactNode, useLayoutEffect } from 'react';

Current:

const ScrollToTop = ({ children }: { children: React.ReactNode }) => { ... }

After cleanup:

const ScrollToTop = ({ children }: { children: ReactNode }) => { ... }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions