UtilityIcon prototype error

Open
#2,739 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, react
Domain
frontend

Research direction

Start by locating the UtilityIcon component and reproduce the warning in the developer console. Inspect how UtilityIcon is declared and how React receives it; done means the warning no longer appears without changing the component's intended behavior.

Written by the indexing model from the issue text.

Description

stale

Hello, I get this error on the developper console :

Warning: The <UtilityIcon /> component appears to be a function component that returns a class instance. Change UtilityIcon to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `UtilityIcon.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.
Dominant language
JavaScript
Stars
994
Forks
444
Avg merge
3d 23h
Merged PRs (30d)
44

Getting set up

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.

More from salesforce/design-system-react

All issues in salesforce/design-system-react

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.