Package Exports
- react-city-selector
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-city-selector) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-city-selector_China
A ReactJS component to render a city selector for Chinese Cities.
Installation
Install react-city-selector
with npm:
$ npm install react-city-selector
Usage
Very easy to use. Just provide props with total amount of things that you want to display on the page.
import React, { Component } from "react";
import ReactDOM from "react-dom";
import CitySelector from "react-city-selector";
ReactDOM.render(
<CitySelector onTabsChange={onTabsChange} onCityChange={onCityChange}/>, document.getElementById("root")
)
Params
Name | Type | Default | Description |
---|---|---|---|
onTabsChange |
Function | cities’ first letter tabs change handler | |
onCityChange |
Function | selected city change handler. Receive selected name as arg |
example image
