Stop exposing `createClass` and `createElement` directly.
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
React's `createClass` and `createElement` methods are exposed directly on the `Window` object by the CMS, for building extensions. This isn't very clean, and could possibly result in conflicts. Also, we have the user using the React class methods (`render`, `handleChange`) directly, which ties us to that specific implementation.
https://github.com/netlify/netlify-cms/blob/6ad6bfd094b78696744f87ffd8038656a2922f7a/src/index.js#L58-L62
Related to #571.
Contributor guide
Research direction
Start with src/index.js at lines 58-62 and read related issue #571. Determine how extension users should access CMS functionality without exposing React methods on Window; done means the direct createClass and createElement exposure and reliance on React class methods are removed while extension behavior remains supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100