state management in pure react v2