• Next.js

    nextjs12.x 集成 less

    1)安装依赖

    npm install next-plugin-antd-less
    npm install classnames
    npm install less-loader
    

    2)在next.config.js中加配置

    const withAntdLess …

  • JEST

    umi test --coverage
    umi test --watch
    umi test \allWorkbooks
    
    // index.test.tsx
    import 'jest';
    import Index from '..';
    import React from 'react';
    import renderer, { ReactTestInstance, ReactTestRenderer } from 'react-test-renderer';
    
    describe('Page: index …

  • React-Admin — Admin

    The component creates an application with its own state, routing, and controller logic. requires only a dataProvider prop, and at least one child to work:

    const App = () => (
        <Admin dataProvider={simpleRestProvider …

  • React-Admin — Resource

    Resource allows you to define a component for each CRUD operation, using the following prop names:

    • list (if defined, the resource is displayed on the Menu)
    • create
    • edit
    • show
    import …

  • React-Admin

    Setting Up

    npm install -g create-react-app
    create-react-app test-admin
    cd test-admin/
    yarn add react-admin ra-data-json-server prop-types
    yarn start
    

    Data Provider …


  • React Hook

    React 16.8.0 是第一个支持Hook的版本。React Native 从0.59版本开始支持 Hook。

    Why react hook ?


    在 …


  • React in ES6

    导出

    React.DOM.a({
      onClick:this._download.bind(this, 'CSV'),
      href: 'data.csv'
    }, 'Export CSV');
    

    展开运算符

    var attr = {
      href: 'http://example.org',
      target: '_blank',
    };
    return …

Page 1 / 2 »

Article
Tagcloud
DVA Azure ML sql database AntV Next Nest ETL AWS Deep Learning Java Flutter TypeScript Angular CI/CD DevTools Microsoft egg Tableau SAP Token Regexp Unit test Docker Nginx nodeJS sails wechat Jmeter HTML2Canvas Swift Jenkins proxy JS event GTM Algorithm Echarts React-Admin Rest React hook Flux Redux ES6 Route Component Ref AJAX Form JSX Virtual Dom Express Javascript CSS design pattern