初始数据
const [getData, setData, resetData] = useStateData({a: 1, b: 2, c: 3});
console.log(getData()); /// {a: 1, b: 2, c: 3}
setData({ a : 10 }); /// {a: 10}
resetData(); /// {a: 1, b: 2, c: 3}
const [getData, setData, resetData] = useStateData('test');
console.log(getData()); /// 'test'
setData('test001'); /// 'test001'
resetData(); /// 'test'
创建用于处理数据的钩子函数