widgets-for-react

2.1.1 • Public • Published

Widgets for React

The widget library allows developers to quickly develop composable and reusable React components by defining a common interface for passing data across different modules of an application.

Installation

You can install with npm install widgets-for-react or yarn add widgets-for-react.

Basic usage

You can create a hello world widget application as follows:

let hello_world_app =
  stateful<string>()(s =>
    div<string>({ className:"form-group" })(
      label<string>("Type text here", { htmlFor:"main-input", label_position: "before" })(
        div<string>({ className:"input-group" })(
          string({ id:"main-input", className:"form-control" })(s)
        )
      )
    )
  )("Hello world!")

Widgets have a run method which can be invoked in order to embed the widget in a normal React application, as follows:

<div>
  { hello_world_app.run(res =>
    console.log("The widget has produced some output data", res)) }
</div>

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.1.11latest

Version History

VersionDownloads (Last 7 Days)Published
2.1.11
2.1.00
2.0.00
1.7.150
1.5.70
1.7.012
1.6.010
1.5.60
1.5.50
1.5.40
1.5.30
1.5.22
1.5.10
1.5.1-rc60
1.5.1-rc50
1.5.1-rc40
1.5.1-rc30
1.5.1-rc20
1.5.1-rc10
1.5.00
1.5.0-rc10
1.4.00
1.3.10
1.2.10
1.2.00
1.1.10
1.0.120
1.0.100
1.0.90
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i widgets-for-react

Weekly Downloads

75

Version

2.1.1

License

ISC

Unpacked Size

76.6 kB

Total Files

38

Last publish

Collaborators

  • giuseppemag
  • weirdwater
  • mabbadi
  • thomassantoli
  • wim_jongeneel