🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More
Socket
Book a DemoInstallSign in
Socket

@lundiak/react-sum

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lundiak/react-sum

ReactJS component to show sum of 2 numbers, as npm package.

Source
npmnpm
Version
1.2.21
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

React Sum

Experimental ReactJS component to show sum of 2 numbers, as npm package.

TravisCI CircleCI SemaphoreCI

Consumer Usage

Import the component where you want to use it, and you ready to use it in render().

Approach 1:

import ReactSum from '@lundiak/react-sum'

<ReactSum.Sum />

Approach 2:

import { Sum } from '@lundiak/react-sum';

<Sum />

Props

PropDescriptionDefault value
aa2
bb2

Example

Your file MyApp.jsx:

import React, { Component } from 'react';
import { Sum } from '@lundiak/react-sum';

class MyApp extends Component {
  render() {
    return (
        <Sum a={2} b={3}/>
    );
  }
}

export default MyApp;

Development

Installation

npm install --save @lundiak/react-sum

Tests

npm test

Storybook

To run locally:

npm run storybook

Publish new version

npm version patch

Note: it will run:

  • npm run prodBuild to build JSX files into dist folder.
  • npm test to verify Component logic (but for now Jest and Cucumber uses dist folder files).
  • npm run build-storybook to build local, static version of Storybook ready for publish.
  • will add changes files to git commit and publish changes.
  • Using patch will increase SemVer patch only.

Resources

About npm main, browser and module, jsnext:main, esm, esnext(2017)

If package.json has "main" field but not a "module" field, all files in that package are loaded as CommonJS. If a package.json has a "module" field but not "main" field, all files in that package are loaded as ES Modules. If a package.json has neither "main" nor "module" fields, it will depend on on whether an index.js or a module.js exists in the package as to whether to load files in the package as CommonJS or ES Modules respectively.

About rename .babelrc to babel.config.js and how this fix import-ing issue.

Webpack and related

Other similar named packages

Notes

TODO

Testing

Jest + Enzyme

Cucumber for JavaScript

FAQs

Package last updated on 16 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts