oussamahamdaoui/forgJs

create-react-app + forgJS

開放

#75 建立於 2019年7月9日

 (11 則留言) (0 個反應) (0 位負責人)JavaScript (51 個分叉)batch import
good first issuehelp wanted

倉庫指標

星標
 (1,669 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Hi there, I'm trying to use forgJS with create-react-app but unfortunately it raise the error:

1!] Error: 'Rule' is not exported by node_modules/@cesium133/forgjs/index.js

this is how I used:

import * as React from 'react';
import { Rule } from '@cesium133/forgjs';
import styles from './styles.css';

const ExampleComponent = ({ text }: any) => {
  const floatRule = new Rule(
    {
      type: 'float',
      min: 100,
    },
    null
  );
  const result = floatRule.test(200.3);
  console.log(result);

  return <div className={styles.test}>Example Component: {text}</div>;
};

export default ExampleComponent;

To have a working example is enough to do: npx create-react-library and then install the package forgJs.

Can someone help me on that please?

貢獻者指南