react-context-toolbox

WebJar for react-context-toolbox

License

License

MIT
Categories

Categories

React User Interface Web Frameworks
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

react-context-toolbox
Last Version

Last Version

2.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

react-context-toolbox
WebJar for react-context-toolbox
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/react-restart/context

Download react-context-toolbox

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/react-context-toolbox/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>react-context-toolbox</artifactId>
    <version>2.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/react-context-toolbox/
implementation 'org.webjars.npm:react-context-toolbox:2.0.2'
// https://jarcasting.com/artifacts/org.webjars.npm/react-context-toolbox/
implementation ("org.webjars.npm:react-context-toolbox:2.0.2")
'org.webjars.npm:react-context-toolbox:jar:2.0.2'
<dependency org="org.webjars.npm" name="react-context-toolbox" rev="2.0.2">
  <artifact name="react-context-toolbox" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='react-context-toolbox', version='2.0.2')
)
libraryDependencies += "org.webjars.npm" % "react-context-toolbox" % "2.0.2"
[org.webjars.npm/react-context-toolbox "2.0.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

@restart/context npm

React context helpers.

Install

npm install @restart/context

Usage

import React from 'react';
import mapContextToProps from '@restart/context/mapContextToProps';

const MyValueContext = React.createContext(null);

function MyComponent(props) {
  /* ... */
}

const MyComponentWithMyValue = mapContextToProps(
  MyValueContext,
  myValue => ({ myValue }),
  MyComponent,
);

const withMyValue = Component =>
  mapContextToProps(
    {
      consumers: MyValueContext,
      mapToProps: myValue => ({ myValue }),
      displayName: `withMyValue(${Component.displayName || Component.name})`,
    },
    Component,
  );
org.webjars.npm
A loose suite of style agnostic components, a11y primitives, and react utilities (icon: https://webkul.github.io/vivid/)

Versions

Version
2.0.2