build: init
This commit is contained in:
32
template/src/pages/test/Test.js
Normal file
32
template/src/pages/test/Test.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import { useAppSelector } from '@/app/hooks';
|
||||
import { useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import * as tocoServices from './testAPI';
|
||||
|
||||
const Test = (props) => {
|
||||
const tocoStore = useAppSelector((state) => state);
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
// 一些常用变量或方法
|
||||
console.log('navigate', navigate);
|
||||
console.log('props', props);
|
||||
console.log('store', tocoStore);
|
||||
console.log('services', tocoServices);
|
||||
console.log('refs', tocoRefs);
|
||||
}, [navigate, props, tocoStore]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Store</h1>
|
||||
<p>the primary color is: {tocoStore.common.primaryColor}</p>
|
||||
<h1>Service</h1>
|
||||
<h1>Refs</h1>
|
||||
<div>
|
||||
<p>children page</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Test;
|
||||
Reference in New Issue
Block a user