Skip to content
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

refactor: Update react imports #245

Merged
merged 2 commits into from
Jun 22, 2023
Merged

Conversation

Itzabelli
Copy link
Contributor

Description

This PR has the purpose adjust and remove unnecessary react imports in this repo.

In these cases:

 import React, {cloneElement, Fragment, useMemo, useState} from 'react';

The first 'React' was removed leaving only the hooks or complements:

import {cloneElement, Fragment, useMemo, useState} from 'react';

and lines that only imported React from 'react', they were removed.

Related Issue

N/A

Motivation and Context

The motivation by removing unnecessary imports is to keep the code as clean as possible. Directly importing react used to be required but for a while now it hasn't been.

How Has This Been Tested?

After making the changes I ran 'yarn dev' and confirmed that there was no error or loss of functionality, everything appeared as expected.

Resources

Reference: The New JSX Transform

Adjust and remove unnecessary imports
@vercel
Copy link

vercel bot commented Jun 20, 2023

@Itzabelli is attempting to deploy a commit to the Yearn Finance Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jun 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
yearnfi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 22, 2023 10:33am

Majorfi
Majorfi previously approved these changes Jun 22, 2023
@Majorfi Majorfi merged commit 53109b2 into yearn:main Jun 22, 2023
5 checks passed
@Itzabelli Itzabelli deleted the update-react-imports branch June 22, 2023 15:24
karelianpie pushed a commit that referenced this pull request Jun 26, 2023
Adjust and remove unnecessary imports

Co-authored-by: Major <90963895+Majorfi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants