hadron-react-bson

5.8.0 • Public • Published

hadron-react-bson

Hadron React Components for BSON values

Usage

Use the getComponent method to return the correct component for the provided BSON type.

const React = require('react');
const getComponent = require('hadron-react-bson');
const component = getComponent('String');

React.createElement(component, { type: 'String', value: 'testing' });

Require components directly. Note that if a BSON type does not have a specific component, it will be handled by the generic Value component which calls toString on the object.

const {
  BinaryValue,
  CodeValue,
  DateValue,
  Value,
  DoubleValue,
  Int32Value,
  KeyValue,
  RegexValue,
  DBRefValue
} = require('hadron-react-bson');

Readme

Keywords

Package Sidebar

Install

npm i hadron-react-bson

Weekly Downloads

60

Version

5.8.0

License

SSPL

Unpacked Size

583 kB

Total Files

6

Last publish

Collaborators

  • orechova
  • himanshusinghs
  • c-buckingham
  • mongo-j
  • mabaasit
  • alexander_schroll
  • chuck.kalmanek
  • mongodb-js-user
  • rueckstiess
  • durran
  • lerouxb
  • fredtruman
  • mbroadst
  • hswolff
  • satyasinha
  • matt_d_rat
  • rhysm
  • tomhollander
  • alena.khineika
  • jeff-allen-mongo
  • mmarcon
  • jonathan.balsano
  • mongodb-build
  • jack.weir
  • stennie
  • mcasimir
  • kristina.stefano
  • jarjee
  • shaketbaby
  • devtoolsbot
  • addaleax
  • gribnoysup
  • mutukrish