New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jswork/react-list

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jswork/react-list

A list component.

1.0.6
npm
Version published
Maintainers
1
Created
Source

react-list

A list component.

version license size download

installation

npm install -S @jswork/react-list

properties

NameTypeRequiredDefaultDescription
classNamestringfalse-The extended className for component.
virtualboolfalse-If node name is React.Framgment.
nodeNameanyfalse'div'Use customize node name(tagName or ReactElement).
itemsarrayfalse[]List data source.
sizeKeystringfalse'length'The collection size key.
allowEmptyboolfalsefalseThe default allow empty element is null.
templatefuncfalsenoopList item template.

usage

  • import css
@import "~@jswork/react-list/dist/style.css";

// or use sass
@import "~@jswork/react-list/dist/style.scss";

// customize your styles:
$react-list-options: ()
  • import js
import ReactDemokit from '@jswork/react-demokit';
import React from 'react';
import ReactDOM from 'react-dom';
import ReactList from '@jswork/react-list';
import './assets/style.scss';

class App extends React.Component {
  state = {
    items: require('./assets/data.json')
  };

  template = ({ item }) => {
    return (
      <div key={item.domId} className="is-item">
        {item.name}
      </div>
    );
  };

  render() {
    return (
      <ReactDemokit
        className="p-3 app-container"
        url="https://github.com/afeiship/react-list">
        <ReactList items={this.state.items} template={this.template} />
      </ReactDemokit>
    );
  }
}

ReactDOM.render(<App />, document.getElementById('app'));

documentation

license

Code released under the MIT license.

Keywords

react

FAQs

Package last updated on 25 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts