react-codemirror2
Advanced tools
Comparing version 7.2.1 to 7.3.0
@@ -66,3 +66,3 @@ 'use strict'; | ||
var SERVER_RENDERED = typeof navigator === 'undefined' || global['PREVENT_CODEMIRROR_RENDER'] === true; | ||
var SERVER_RENDERED = typeof navigator === 'undefined' || typeof global !== 'undefined' && global['PREVENT_CODEMIRROR_RENDER'] === true; | ||
var cm; | ||
@@ -69,0 +69,0 @@ |
{ | ||
"name": "react-codemirror2", | ||
"version": "7.2.1", | ||
"version": "7.3.0", | ||
"description": "a tiny react codemirror component wrapper", | ||
@@ -56,4 +56,4 @@ "main": "index.js", | ||
"peerDependencies": { | ||
"react": ">=15.5 <=16.x", | ||
"codemirror": "5.x" | ||
"codemirror": "5.x", | ||
"react": ">=15.5 <=17.x" | ||
}, | ||
@@ -85,3 +85,3 @@ "devDependencies": { | ||
"node-sass": "4.14.1", | ||
"prismjs": "1.20.0", | ||
"prismjs": "1.25.0", | ||
"raf": "3.4.1", | ||
@@ -88,0 +88,0 @@ "react": "16.13.1", |
@@ -12,4 +12,9 @@ [](https://travis-ci.org/scniro/react-codemirror2) | ||
> npm install react-codemirror2 codemirror --save | ||
## Install | ||
```bash | ||
npm install react-codemirror2 codemirror --save | ||
``` | ||
`react-codemirror2` ships with the notion of an [uncontrolled](https://reactjs.org/docs/uncontrolled-components.html) and [controlled](https://reactjs.org/docs/forms.html#controlled-components) component. `UnControlled` consists of a simple wrapper largely powered by the inner workings of `codemirror` itself, while `Controlled` will demand state management from the user, preventing codemirror changes unless properly handled via `value`. The latter will offer more control and likely be more appropriate with [redux](http://redux.js.org/) heavy apps. | ||
@@ -52,3 +57,3 @@ | ||
`codemirror` comes as a [peer dependency](https://nodejs.org/en/blog/npm/peer-dependencies/), meaning you'll need to require it in your project _in addition to_ `react-codemirror2`. This prevents any versioning conflicts that would arise if `codemirror` came as a dependency through this wrapper. It's been observed that version mismatches can cause difficult to trace issues such as sytax highlighting disappearing without any explicit errors/warnings | ||
`codemirror` comes as a [peer dependency](https://nodejs.org/en/blog/npm/peer-dependencies/), meaning you'll need to require it in your project _in addition to_ `react-codemirror2`. This prevents any versioning conflicts that would arise if `codemirror` came as a dependency through this wrapper. It's been observed that version mismatches can cause difficult to trace issues such as syntax highlighting disappearing without any explicit errors/warnings | ||
@@ -55,0 +60,0 @@ - additional |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
70118
205
1