-
React projects cannot save store? using redux, data
react projects cannot save store? using redux, data
index.js
ReactDOM.render(
<Provider store={store}>
<Router >
< Provider>, document.getElementById( root ))
registerServiceWorker()
actions
export const SET_USER = ...
-
How does react change the value of input
how to use react to change the value of Input
< hr >
export default class myForm extends Component{
constructor(props){
super(props);
this.state = {
id: ,
};
}
change=()=>{
var idIn...
-
This problem in react component method
1
2
as shown in the two figures above: in the react component, it is known that all other environments are the same, except that there is an extra layer of arrow function in figure 1. Ask: why is it that in the scroll method of this component, this i...
-
About the scaffolding of dva
Let me ask you a question. I use dva scaffolding to build the project.
I want to use browserHistory as the background interface, but the packaged project is blank and there is no error! If you change to use the default hashHistory, it will be fine....
-
How to locate the cursor to a tr by the Table component under antdesign
recently, a company project has a requirement to use input to query an attribute in table, and then the interface locates to that tr and changes the color to identify it. It seems that Table s api cannot be realized. Is there a good way to implement it?...
-
Using flexbox layout problems?
AB are elastic layouts A distance B minimum 20 A can compress B B minimum 30 AB is located at both ends of the horizontal how to implement this layout with flexbox? as shown in the figure: ...
-
Switch routes, the timer on the previous page is still running
at the home page, the message prompts you to jump to the Detail component to initialize the data that can only be rendered from Control. Clicking on a new message here will not trigger constructor, so I am dealing with nextProps data. If the time of the ...
-
How to combine multiple objects into an array object
{
"date":{"0":"20180201","1":"20180202","2":"20180205"},
"lines":{"0":3.3,"1":10.4,"2":79.721},
"count":{"0":5,"1":...
-
[to fix] how does react circulate the data in the interface?
A single output data is OK, how to loop the data in the output interface? Solve?
original
<div id="demo">< div>
<script type="text babel">
var UserGist = React.createClass({
getInitialStat...
-
Reactjs multiple pages need to get the values returned by the same ajax.
there are multiple pages that need to have a property that needs to call the API to return judgment display logic my idea is to cache but how to write multiple pages to write code as little as possible want a rough code design framework
it s not ho...
-
How to transfer parameters between two subpages by react-router4.0
the "Application enabling platform " page is expanded by default. Radio selects a row in the table, id as a parameter, and the page that needs to be passed to the enterprise information. In topic, it is impossible to pass parameters in the form of call...
-
React's warning
an error was prompted after using server-side rendering
mobx
Please also explain
...
-
React error report solution!
Warning: Encountered two children with the same key, `.$4`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and or omitted the behavior is unsupported and could change i...
-
After the react parent component setState updates the data, the props passed to the child component is undefined
the updated value of the parent component is obtained from the child component, and then the updated value is passed to another child component , but what you get is undefined, that is, you can get the value before the parent component is updated. After...
-
Websocket re-new the address after being disconnected. Ws.onmessage has no data.
after WebSocket was disconnected, I re-new a link. In the new connection, I can continue to receive and send data, but I found that ws.onmessage did not return the data after reconnection. I think he is still waiting for the data of the address before ...
-
Is @ connect a grammatical sugar in react-redux? How to use it?
currently only know the traditional usage
const App = connect(
mapStateToProps,
mapDispatchToProps
)(Counter);
but many projects use
@connect(state => ({
value: state.global.value,
extinfo: state.extinfo,
}))
I can understand what i...
-
At the beginning, there was a problem in using redux, to use redux to add, delete, check and correct data.
I have been studying redux for several days, and I am doing a redux dome, that adds, deletes, checks and modifies the data. I follow the tutorials I am looking for on the Internet, but I don t understand. so now there are several mistakes and there is...
-
After the promotion of webpac4, the node did not make an error, but the following error appeared on the page
the configuration is as follows: const webpack = require ( webpack ) const path = require ( path ) const fs = require ( fs ) const chalk = require ( chalk ) const HtmlWebpackPlugin = require ( html-webpack-plugin ) const WebpackMd5H...
-
There's something wrong with the HOC that wrote a React.
HOC function: accepts Input | TextArea and other input components in the antd component, and injects the debounce method in lodash into the onchange event. The code is as follows:
import {Input} from antd ;
HOC(<Input >)
...
-
How to trigger subcomponent updates through this.refs ['xx']
there is a parent component that circulates N child components in render, and there is a unique ref, on each child component. When the first child component changes, the change method of the parent component will be called back, and the latter component...