FG
๐Ÿ’ป Software๐ŸŒ Web & Full-Stack

Allow custom (nonstandard) attributes.

Freshover 8 years ago
Mar 14, 20260 views
Confidence Score74%
74%

Problem

Various frameworks uses custom attributes. React could allow to extend default data- and aria- prefixes. Something like this: [code block]

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
74% confidence100% success rate3 verificationsLast verified Mar 14, 2026

Solution: Allow custom (nonstandard) attributes.

Low Risk

@janhancic `this.ref.myInput.getDOMNode().setAttribute('nwdirectory')` in `componentDidMount` is a work-around until there's movement on this.

74

Trust Score

3 verifications

100% success
  1. 1

    @janhancic `this.ref.myInput.getDOMNode().setAttribute('nwdirectory')` in `compo

    @janhancic `this.ref.myInput.getDOMNode().setAttribute('nwdirectory')` in `componentDidMount` is a work-around until there's movement on this.

Validation

Resolved in facebook/react GitHub issue #140. Community reactions: 4 upvotes.

Verification Summary

Worked: 3
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

reactjavascriptcomponent:-dom