1.9.1 • Published 10 months ago

@leafnet/calculatorview-react v1.9.1

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Introduction

Used in internal projects. Not ment

Install

npm install @leafnet/calculatorview-react

Data

Add data in assets folder and configure webpack.config.js as follows

  devServer: {
    ...,
    static: ["assets"],
  },

Use

import ReactDOM from "react-dom/client";
import { LfMortalityCalculatorComplex } from "@leafnet/calculatorview-react";
import { useEffect, useState } from "react";

const root = ReactDOM.createRoot(document.getElementById("root"));

const RootElement = () => {
  const [dataFromInternet, setDataFromInternet] = useState();

  useEffect(() => {
    const loadData = async () => {
      let data = await fetch("/sofa.json");
      data = await data.json();
      console.log(data);
      setDataFromInternet(data);
    };
    loadData();
  }, []);

  return (
    dataFromInternet && (
      <>
        <LfMortalityCalculatorComplex
          dataFromInternet={dataFromInternet}
          isHidden={false}
          handleEvent={null}
        ></LfMortalityCalculatorComplex>
      </>
    )
  );
};
root.render(<RootElement />);
1.9.1

10 months ago

1.7.1

10 months ago

1.6.28

10 months ago

1.6.27

10 months ago

1.6.29

10 months ago

1.6.4

10 months ago

1.6.3

10 months ago

1.6.2

10 months ago

1.6.1

10 months ago

1.6.20

10 months ago

1.6.22

10 months ago

1.6.21

10 months ago

1.6.24

10 months ago

1.6.23

10 months ago

1.6.26

10 months ago

1.6.25

10 months ago

1.6.9

10 months ago

1.6.11

10 months ago

1.6.8

10 months ago

1.6.10

10 months ago

1.6.13

10 months ago

1.6.6

10 months ago

1.6.5

10 months ago

1.6.15

10 months ago

1.6.17

10 months ago

1.6.16

10 months ago

1.6.19

10 months ago

1.6.18

10 months ago

0.1.2

3 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.7

4 years ago

0.0.3

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.2

4 years ago