Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-simple-keyboard

Package Overview
Dependencies
Maintainers
1
Versions
1650
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-simple-keyboard - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

2

package.json
{
"name": "react-simple-keyboard",
"version": "1.4.1",
"version": "1.4.2",
"description": "React.js Virtual Keyboard",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -298,2 +298,24 @@ [![npm version](https://badge.fury.io/js/react-simple-keyboard.svg)](https://www.npmjs.com/package/react-simple-keyboard)

This is a port of the [simple-keyboard feature](https://www.npmjs.com/package/simple-keyboard#dispatch) of the same name.
If you'd like to use a more react-like approach to sending props to many instances, you can use shared props like so:
```js
let sharedProps = {
layoutName: this.state.layoutName,
onChange: input => this.onChange(input),
onKeyPress: button => this.onKeyPress(button),
};
// Keyboard 1
<Keyboard {...sharedProps} />
// Keyboard 2
<Keyboard {...sharedProps} />
```
This way you can update your desired instances at the same time using `this.setState`.
[![Edit react-simple-keyboard multiple instances demo](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/8z2jw9okm8)
## Q&A / Use-cases

@@ -300,0 +322,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc