fj-react-toolbox

0.0.3 • Public • Published

react-fj-toolbox

react toolbox

PromiseView

inject promise value to child component

Example:

const ShowId=({name,id})=><div>{name}:{id}</div>;
const getId=axios.get('/id').then(resp=>resp.data);

<PromiseView promise={getId()} then="id">
      <ShowId name="jack"/>
</PromiseView>

Package Sidebar

Install

npm i fj-react-toolbox

Weekly Downloads

1

Version

0.0.3

License

ISC

Last publish

Collaborators

  • fangjian