react-component / react-component/select

Use the default export from React, ReactDOM and PropTypes

Open
#362 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
938
Forks
482
Avg merge
15h 8m
Merged PRs (30d)
2

Description

Is there any reason for doing
import * as React from 'react
import * as ReactDOM from 'react-dom'
import * as PropTypes from 'prop-types'

instead of

import React from 'react' etc..?

When I try to bundle a library that i am creating with rollup, it expects them as named exports of the file , eg. node_modules/rc-select/es/Select and it should not.

Fixing this (if there is no specific reason behind this) would resolve this issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the source imports corresponding to the generated node_modules/rc-select/es/Select entry point and inspect how React, ReactDOM, and PropTypes are imported. Update the imports to use defaults where appropriate, then verify that Rollup no longer treats them as named exports and that the existing test suite still passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.