react-component / react-component/tooltip

Determining the availability of props.visible

Open
#95 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
944
Forks
199
Avg merge
19h 1m
Merged PRs (30d)
3

Description

Hello Guys! I noticed that you check the props.visible by the presence of it in props.
Why not check for undefined?

https://github.com/react-component/tooltip/blob/b5e43fd3128f6bec414c7bb0308a4f998105118a/src/Tooltip.jsx#L72

We use a rule eslint - react/require-default-props. And set props.visible as undefined in the defaultProps. And if the props.visible is equal to undefined, then he still gets to extraProps.popupVisible.

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 at src/Tooltip.jsx line 72 and inspect how props.visible is checked before extraProps.popupVisible is assigned. Compare that behavior with the defaultProps case described in the issue, then run the repository's relevant tests to verify the expected handling when visible is undefined.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.