@actbase/react-absolute 中文文档教程

发布于 3年前 浏览 12 项目主页 更新于 3年前

react-absolute

平台 npmnpm

github issuesgithub 已关闭问题Issue Stats

What is react-absolute

众所周知,React 是非常强大的开发框架。 在 JSX Struct 中我们不需要学习新特性。 开发人员有时应该制作一些没有主渲染块的依赖组件。 我们知道一些如何在任何时间和任何点出现自定义组件。 如果你想使用更强大的 react js,应该考虑使用我们的“react-absolute”解决方案。

Install

  • Using npm
npm install @actbase/react-absolute;
  • Using yarn
yarn add @actbase/react-absolute;

Getting Started / Usage

Preconfig for using.

  • On very first entry point. index.js or app.js
  • Make sure wrapping with Absolute
import Absolute from '@actbase/react-absolute';

const App = ()=>{
  return (
    <Absolute.Provider style={{flex:1}}>
      {/* rendered components before. */}
    </Absolute.Provider>
  )
}
export App;

Usage

  • Using with render block
import Absolute from '@actbase/react-absolute';

const SomeComponent = ({})=>{
  if( condition ) return null;  
  return (
    <Absolute style={{}}>

    </Absolute>
  )
}
  • Using with event function.
<SomeEventProvider someEventHandler={()=>{
  // adding absolute on your purpose.
  const handler = Absolute.add(
    <ToBeAboluteComponentYouHave />
  );

  // remove.
  handler.remove();
}} />

Interfaces & methods

  • props of Absolute.Provider
  • Methods
    • add

Contact us

如果您考虑使用 React 提供服务。

打电话给我们

react-absolute

platforms npmnpm

github issuesgithub closed issuesIssue Stats

What is react-absolute

As already known React is very powerful framework for development. In JSX Struct we don't need to learn new feature. Developers sometimes should make some dependent component without main render block. We know some how appearencing custom Component on any time and any point. If you want using react js more powerfull should consider using our "react-absolute" solution.

Install

  • Using npm
npm install @actbase/react-absolute;
  • Using yarn
yarn add @actbase/react-absolute;

Getting Started / Usage

Preconfig for using.

  • On very first entry point. index.js or app.js
  • Make sure wrapping with Absolute
import Absolute from '@actbase/react-absolute';

const App = ()=>{
  return (
    <Absolute.Provider style={{flex:1}}>
      {/* rendered components before. */}
    </Absolute.Provider>
  )
}
export App;

Usage

  • Using with render block
import Absolute from '@actbase/react-absolute';

const SomeComponent = ({})=>{
  if( condition ) return null;  
  return (
    <Absolute style={{}}>

    </Absolute>
  )
}
  • Using with event function.
<SomeEventProvider someEventHandler={()=>{
  // adding absolute on your purpose.
  const handler = Absolute.add(
    <ToBeAboluteComponentYouHave />
  );

  // remove.
  handler.remove();
}} />

Interfaces & methods

  • props of Absolute.Provider
  • Methods
    • add

Contact us

If you consider make service with react.

Call us

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文