This release contains significant internal changes.
Prior to v3.0.0
, earlier versions of the library used different internals. We recommend using the latest version you can.
Version | Supported React version | Editor | Transpiler |
---|---|---|---|
v3.x.x | v17.x.x | use-editable
| Sucrase
|
v2.x.x | v16.x.x | react-simple-code-editor
| Bublé
|
Additionally, several members of the community reported an issue introduced in 2.3.0
which threw the following Invariant error:
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
This appears to have been cause by differing React versions between React Live and projects targeting React 17.
Upgrading to this new release should address that issue.
🚨 Breaking 🚨
- swap Buble for Sucrase by @jpdriver in #295
- this removes the
transpileOptions
prop as Sucrase does not require additional options
- this removes the
✨ Features ✨
- switch from
react-simple-code-editor
touse-editable
by @jpdriver in #266- see https://github.com/FormidableLabs/use-editable for more
- upgrade to React 17 by @jpdriver in #293
- Add
prism
prop to Editor by @srmagura in #287 - Support async
transformCode
, catch transformCode errors by @srmagura in #285
🐛 Bugfixes 🐛
introduced in v2.4.1
or earlier
introduced in RC releases for v3.0.0
- chore: pass
style
prop to inner div by @thiskevinwang in #299 - ensure
font-family
is respected by @jpdriver in #300
🔐 Security 🔐
📖 Documentation 📖
- Update images in README to use https by @melvin-chen in #294
- fixup demo site by @jpdriver in #296
👩🏻💻New Contributors 👨🏿💻
- @melvin-chen made their first contribution in #294
- @andgra made their first contribution in #271
- @thiskevinwang made their first contribution in #299
- @srmagura made their first contribution in #287
Full Changelog: v2.4.1...v3.0.0