0.15.7 • Published 4 years ago

@doctorlink/traversal-react-redux v0.15.7

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

React components and redux tools for use with the Traversal Engine API

Installation

DoctorLink's Traversal Client Tools are available as an npm package.

npm install @doctorlink/traversal-react-redux

Contents

SectionDescription
ComponentsAll of the components used in the library
Component ModulesComponents combined in useful ways
ThemingCreating custom themes
Redux ReducersDefining/updating the store
ActionsActions to be dispatched to the store
ContainersComponents bound to state/actions
SagasSagas to handle state side-effects
ServicesServices for making api calls
StoreComplete Redux-Saga Stores
SamplesSamples of how this library can be used

Usage

Here is a quick example to get you started, it's all you need:

import React from 'react';
import { render } from 'react-dom';
import { TraversalStore, TraversalApp } from '@doctorlink/traversal-react-redux';

//Token requested from POST https://prod-platform-identity.doctorlink.engineering/connect/token
const bearerToken = 'TOKEN';
const productId = 1;
const traversalEngineApi = 'https://prod-platform-traversal-engine.doctorlink.engineering';

const traversalStore = new TraversalStore(traversalEngineApi);

traversalStore.store.dispatch(traversalStart({productId}));
traversalStore.setToken(bearerToken)

render(<TraversalApp store={traversalStore.store} />, document.getElementById('root'));

Development

For ease of development, use npm link to point your client app to this library. You can then run npm start to compile your code on save, and your changes should be picked up immediately by your client app. For example:

cd TraversalReactRedux
npm link
cd ../TraversalEngineAPI/services/traversalclient/ClientApp/
npm link @doctorlink/traversal-react-redux

# In another console:
cd TraversalReactRedux
npm start

If you get an error about duplicate versions of react and/or react-dom ("Hooks can only be called inside the body of a function component"), try pointing this library to the versions used by your app:

npm link ../TraversalEngineAPI/services/traversalclient/ClientApp/node_modules/react
npm link ../TraversalEngineAPI/services/traversalclient/ClientApp/node_modules/react-dom

Note that react and react-dom are required both as peerDependencies and devDependencies; the latter is because they are required by the unit tests.

Publish

To publish the library run the AZDO publish pipeline. By default this will publish a patch release and update the latest tag in npm, but both of these options can be overriden in the variables tab.

Version can be one of the following: patch | minor | major | prepatch | preminor | premajor | prerelease

Tag can be overriden for other streams: latest | beta | next | staging

0.15.7

4 years ago

0.15.6

4 years ago

0.15.5

4 years ago

0.15.4

4 years ago

0.15.2

4 years ago

0.15.3

4 years ago

0.15.1

4 years ago

0.15.0

4 years ago

0.14.3

4 years ago

0.14.4

4 years ago

0.14.2

4 years ago

0.14.1

4 years ago

0.14.0

4 years ago

0.13.0

4 years ago

0.12.0

4 years ago

0.11.4

4 years ago

0.11.3

4 years ago

0.11.2

4 years ago

0.11.1

4 years ago

0.11.0

4 years ago

0.10.9-8

4 years ago

0.10.9-7

4 years ago

0.10.9-5

4 years ago

0.10.9-4

4 years ago

0.10.9-2

4 years ago

0.10.9-3

4 years ago

0.10.9-0

4 years ago

0.10.8

4 years ago

0.10.7

4 years ago

0.10.6

4 years ago

0.10.5

4 years ago

0.10.4

4 years ago

0.10.2

4 years ago

0.10.1

4 years ago

0.10.0

4 years ago

0.9.1

4 years ago

0.9.0

4 years ago

0.8.0

4 years ago

0.7.10

4 years ago

0.7.9

4 years ago

0.7.8

4 years ago

0.7.7

4 years ago

0.7.6

4 years ago

0.7.5

4 years ago

0.7.4

4 years ago

0.7.3

4 years ago

0.6.2

4 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.5

4 years ago

0.5.4

4 years ago

0.5.3

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.25

5 years ago

0.3.24

5 years ago

0.3.23

5 years ago

0.3.22

5 years ago

0.3.21

5 years ago

0.3.20

5 years ago

0.3.19

5 years ago

0.3.18

5 years ago

0.3.17

5 years ago

0.3.16

5 years ago

0.3.15

5 years ago

0.3.14

5 years ago

0.3.13

5 years ago

0.3.12

5 years ago

0.3.11

5 years ago

0.3.10

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago