React Component Lifecycle
https://solome.js.org/web/react/2016/11/30/react-lifecycle.html
React.createElement: type is invalid – expected a string or a class/function but got: undefined
resolution:
|
|
to
|
|
Warning: Failed context type: The context router
is marked as required in Link
, but its value is undefined
.
router
is marked as required in Link
, but its value is undefined
.resolution: change /src/root.js
to
|
|
how to modify themes of ant design via third-party or custom webpackConfig
resolution: change webpack.config.js to
loading static sources (images) with webpack
resolutions: add rules like this
now can use require(...)
or ‘import’ to load images by relative path in jsx;
how to use css media query in css-modules
https://npm.taobao.org/package/postcss-modules-values
cannot read videos of null
when map the this.state.videos
resolution:
add this.state={...}
to constructor
|
|
how to use Promise.all to fetch two urls simultaneously
refer to: https://segmentfault.com/q/1010000004101262/a-1020000004101642
how to use BMap with webpack
resolution:
add option externals
to the end of webpack-config.js
and then import BMap from 'BMap'
when you need;
where to find svg pics
pixabay.com
this.props.dispatch is not a function
when using react-redux to connect store and component;
resolution: explicitly return it yourself in mapDispatchToProps
implementation;
ant design Carousel component connot autoplay when using react-redux to connect component which has imported the Carousel
resolution:
dont use “connect” for Carousel contained components;
ant design Tabs animated lag during switch tabpane via big data
do not forget to call callback in the validator
of Form.Item when you call this.props.form.validateFields
or this.props.form.validateFieldsAndScroll
with a Form.Item
which contains a validator’s callback not called
|
|
is not equal to:
nodejs server router is in conflict with react-router BrowserRouter
resolution:
use HashRouter instead of BrowserRouter or manualy set histroyFallback
http://www.cnblogs.com/YZH-chengdu/p/6855237.html
textarea height auto increment
|
|