jariz / jariz/react-truncate-html

Rename dangerouslySetInnerHTML to html

Open
#8 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
50
Forks
11
PR merge metrics
No merged PRs in 30d

Description

RTH sanitizes html now, which means it does not mimic the same behavior as `dangerouslySetInnerHTML`, therefore it should be renamed, as this can possibly cause confusion amongst beginners who are not familiar with `dangerouslySetInnerHTML` and assume it always sanitizes - which it does not.

Suggestion: ``

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the Truncate component and every reference to dangerouslySetInnerHTML. Check how the current html input is passed and whether examples or documentation use that name. Done means the public prop uses html consistently and the suggested Truncate html="my HTML" usage works without confusion.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.