React basic

import React, { Component } from ‘react’;

class Timer extends Component {
constructor(props) {
super(props);

this.state = {
};
}

render() {
const { } = this.state;

return (
12345
);
}
}

export default Timer;

 

OR

 

import React, { lazy } from ‘react’
import { useSelector, useDispatch } from ‘react-redux’
import {
CRow,
CCol,
} from ‘@coreui/react’

const Template = () => {

const {
title,
…attributes
} = props

//redux
const dispatch = useDispatch()
const getState = useSelector(state => state)
const currentPage = useSelector(state => state.currentPage)

dispatch({type: ‘set’, currentPage: ‘Template’})

return (
<div className=”Template”>
<CRow>
<CCol xs=”12″ sm=”12″ md=”12″>
content here
</CCol>
</CRow>
</div>
)
}

export default Template

Leave a Reply

Your email address will not be published. Required fields are marked *