valueflow-unit-selector

## Description This is a unit selector module for [Valueflow](https://github.com/peterporfy/valueflow).

Usage no npm install needed!

<script type="module">
  import valueflowUnitSelector from 'https://cdn.skypack.dev/valueflow-unit-selector';
</script>

README

Valueflow Unit Selector

Description

This is a unit selector module for Valueflow.

You can select the current unit of value (e.g. USD or EUR) which then can be consumed by other modules to provide results in the given unit.

Dev guide

You can use the getSelectedUnit selector within your mapStateToProps(state) function in your redux connected react component.

function mapStateToProps(state) {
  const unit = getSelectedUnit(state.valueflow);
  ...