Skip to content

Releases: fatalxiao/vivy

2.2.5

15 Dec 06:34
Compare
Choose a tag to compare

Improve ReduxStore

2.2.4

15 Dec 06:33
Compare
Choose a tag to compare

Optimize babel config

2.2.3

15 Dec 06:33
Compare
Choose a tag to compare

Optimize babel config

2.2.2

15 Dec 06:32
Compare
Choose a tag to compare

Improve RootReducer

2.2.1

15 Dec 06:32
Compare
Choose a tag to compare
  • Improve RootReducer
  • Add VivyOption unit test

2.2.0

15 Dec 06:30
Compare
Choose a tag to compare

Add VivyOptionReducer

Allows Vivy plugins or applications to read vivy options easily.

Improvement

  • VivyStore
  • ReduxStore
  • Unit test

2.1.2

15 Dec 06:25
Compare
Choose a tag to compare
  • Improve build
  • Improve .npmrc

2.1.1

15 Dec 06:23
Compare
Choose a tag to compare
  • Improve comments
  • Improve readme

2.1.0

30 Jun 02:37
Compare
Choose a tag to compare

Add build-in model reducer setState

Use build-in model reducer setState can easily dispatch a simple value updating action. Model reducer is no need written.

Vivy model

export default {
    nameSpace: 'example',
    state: {
        value: ''
    }
};

component

import React, {useCallback} from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';

const Example = ({
    value,
    dispatch
}) => {

    /**
     * Update value to model
     */
    const handleValueChange = useCallback(e => {

        // Use build-in "setState reducer" update model state
        dispatch?.({
            type: 'example/setState',
            nextState: state => ({
                ...state,
                value: e?.target?.value
            })
        });

    }, [
        dispatch
    ]);

    return (
        <input value={value}
               onChange={handleValueChange}/>
    );

};

Example.propTypes = {
    value: PropTypes.string,
    dispatch: PropTypes.func
};

export default connect(state => ({
    value: state.example.value
}))(Example);

Upgrades

  • Add Validation
  • Unit test

Improve examples

  • calculation
  • counter
  • globalReducer
  • requestApi
  • pyramid

2.0.6

30 Jun 01:59
Compare
Choose a tag to compare

Upgrade Unit test

Improve examples

  • calculation
  • counter
  • globalReducer
  • requestApi
  • pyramid