1.0.30 • Published 1 year ago

@react-mini/redux v1.0.30

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Implements the most basic functionality of react-redux with a bundle size of 5.24kB.

Components to use:

Example:

import React, { useState } from "react";
import { onStoreChanged,updateState  } from "@react-mini/redux";

export const Home = () => {
  const propertyName = "buttonClick";
  const [buttonState, setButtonState] = useState(false);

  onStoreChanged({
    propertyName,
    callback: (data) => setButtonState(data),
  });

  return (
    <div>
      <input
        type="button"
        onClick={() =>
          updateState({
            value: !buttonState,
            propertyName,
          })
        }
        value={`${buttonState}`}
      ></input>
    </div>
  );
};
1.0.30

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago