grommet / grommet/jsx-to-string

Unneded dependencies

Open
#48 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
122
Forks
26
PR merge metrics
No merged PRs in 30d

Description

The code has some unneded external dependencies.
We have to add whole react only for a oneliner:
```
/**
* Verifies the object is a ReactElement.
* See https://reactjs.org/docs/react-api.html#isvalidelement
* @param {?object} object
* @return {boolean} True if `object` is a ReactElement.
* @final
*/
export function isValidElement(object) {
return (
typeof object === 'object' &&
object !== null &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
```

see:
https://github.com/grommet/jsx-to-string/blob/bd786a0393fee81df262bfb83b3945710a1327cf/src/index.js#L1

same goes proabably for immutable.js and json-stringify-pretty-compact

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading src/index.js at the linked commit and inspect how React, immutable.js, and json-stringify-pretty-compact are used. Compare those uses with the dependency declarations, then verify that the same JSX-to-string behavior remains after unnecessary external dependencies are removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.