diff --git a/.eslintrc.js b/.eslintrc.js
index eee27e1ec164..774648f1f155 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -50,7 +50,6 @@ if (process.env.ANTD === 'DEMO') {
'prefer-rest-params': 0,
'react/no-multi-comp': 0,
'react/prefer-es6-class': 0,
- 'react/prefer-stateless-function': 0,
});
}
diff --git a/components/breadcrumb/demo/router.md b/components/breadcrumb/demo/router.md
index 71b6789b74a6..a208a1849495 100644
--- a/components/breadcrumb/demo/router.md
+++ b/components/breadcrumb/demo/router.md
@@ -11,43 +11,39 @@ const ReactRouter = require('react-router');
let { Router, Route, Link, hashHistory } = ReactRouter;
import { Breadcrumb } from 'antd';
-const Apps = React.createClass({
- render() {
- return (
-
- -
- 应用1:详情
-
- -
- 应用2:详情
-
-
- );
- }
-});
+function Apps() {
+ return (
+
+ -
+ 应用1:详情
+
+ -
+ 应用2:详情
+
+
+ );
+}
-const Home = React.createClass({
- render() {
- return (
-
-
- 首页
- 应用列表
-
- {this.props.children || 'Home'}
-
+function Home(props) {
+ return (
+
+
+ 首页
+ 应用列表
+
+ {props.children || 'Home'}
+
点击上面的导航切换页面,面包屑在下面:
-
-
- );
- }
-});
+
+
+ );
+}
ReactDOM.render(
diff --git a/components/locale-provider/demo/basic.md b/components/locale-provider/demo/basic.md
index 8d3fb985b152..9c9707e105d6 100644
--- a/components/locale-provider/demo/basic.md
+++ b/components/locale-provider/demo/basic.md
@@ -9,15 +9,13 @@ title: 国际化
import { Pagination, LocaleProvider } from 'antd';
import enUS from 'antd/lib/locale-provider/en_US';
-const App = React.createClass({
- render() {
- return (
-
- );
- }
-});
+function App() {
+ return (
+
+ );
+}
ReactDOM.render(
diff --git a/components/queue-anim/demo/router.md b/components/queue-anim/demo/router.md
index f419f3e59db7..6e4379d14fb2 100644
--- a/components/queue-anim/demo/router.md
+++ b/components/queue-anim/demo/router.md
@@ -11,114 +11,106 @@ const ReactRouter = require('react-router');
let { Router, Route, Link, hashHistory } = ReactRouter;
import { QueueAnim, Menu } from 'antd';
-const App = React.createClass({
- render() {
- const key = this.props.location.pathname;
- const keys = key.replace('/', '') ? [key.replace('/', '')] : ['home'];
- return (
-
-
-
- {React.cloneElement(this.props.children || , { key })}
-
-
- );
- }
-});
+function App(props) {
+ const key = props.location.pathname;
+ const keys = key.replace('/', '') ? [key.replace('/', '')] : ['home'];
+ return (
+
+
+
+ {React.cloneElement(props.children || , { key })}
+
+
+ );
+}
-const Home = React.createClass({
- render() {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+function Home() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+function Page1() {
+ return (
+
- );
- }
-});
+
+
+
+
+ );
+}
-const Page1 = React.createClass({
- render() {
- return (
-
-
-
-
+function Page2() {
+ return (
+
+
- );
- }
-});
-
-const Page2 = React.createClass({
- render() {
- return (
-
- );
- }
-});
+
+ );
+}
ReactDOM.render((
diff --git a/components/table/demo/fixed-columns-header.md b/components/table/demo/fixed-columns-header.md
index d0dcc2276c94..800f83f62116 100644
--- a/components/table/demo/fixed-columns-header.md
+++ b/components/table/demo/fixed-columns-header.md
@@ -40,11 +40,9 @@ for (let i = 0; i < 100; i++) {
});
}
-const App = React.createClass({
- render() {
- return ;
- }
-});
+function App() {
+ return ;
+}
ReactDOM.render(, mountNode);
````
diff --git a/components/table/demo/fixed-columns.md b/components/table/demo/fixed-columns.md
index 9f22a87158bb..cb7640b1bac1 100644
--- a/components/table/demo/fixed-columns.md
+++ b/components/table/demo/fixed-columns.md
@@ -40,11 +40,9 @@ const data = [{
age: 42,
}];
-const App = React.createClass({
- render() {
- return ;
- }
-});
+function App() {
+ return ;
+}
ReactDOM.render(, mountNode);
````