score:1

Accepted answer

the function handlechange should get only an event as a parameter.
handlechange(e) this event is attached to the target element, so you can access its values via e.target.value;
with that said, do not bind the handlers in the render function. do it in the constructor as it will create a new instance of the handler on each render call. bad for performance. as for the redux flow, you should use connect.
export default connect(mapstatetoprops, mapdispatchtoprops)(testing).
edit
after another look at your code, beside the fact that you didn't use connect to connect the component to redux, you are mapping a wrong object to mapdispatchtoprops.
in this code you are using loginaction:

function mapdispatchtoprops(dispatch) {
  return {
    actions: bindactioncreators(loginaction, dispatch)
  }
}  

but you never imported it, you used a name import:
import { loginsuccess, loginrequest, login } from '../actions/loginaction';
one possible way to import everything and pass it to mapdispatchtoprops is this:
import * as loginaction from '../actions/loginaction';
another mistake you made is naming this object with different name on proptypes, you named it actions and not loginaction

testing.proptypes = {
  actions: proptypes.object.isrequired,

};

you will need the same name:

testing.proptypes = {
  loginaction: proptypes.object.isrequired,

};

and again don't forget to connect!!

score:0

i believe you need to connect your component to redux.

import { connect } from 'react-redux'

 // your code

 export default connect(mapstatetoprops, mapdispatchtoprops)(testing)

don't forget to remove export default from before your class as well.

edit: please use setstate if you're planning on modifying the local state of a component.


Related Query

More Query from same tag