i have a little question, i having use PrimeReact to develop my stuff but sometimes is quite annoying change from classcomponent to functional component, so i want to change this component to funtional, someone can help me?
import React, { Component, useState } from 'react';
import { OverlayPanel } from 'primereact/overlaypanel';
import { Button } from 'primereact/button';
class Datas extends React.Component {
render() {
return (
<div className='content-section implementation'>
<Button
type='button'
icon='pi pi-search'
// label='Toggle'
onClick={e => this.op.toggle(e)}
/>
<OverlayPanel ref={el => (this.op = el)}>
<Button
type='button'
icon='pi pi-search'
// label='Toggle'
onClick={e => (e)}
/>
</OverlayPanel>
</div>
);
}
}
export default Datas