Closed stropitek closed 5 months ago
Latest commit: |
26ad88f
|
Status: | ✅ Deploy successful! |
Preview URL: | https://fcda01ba.react-science.pages.dev |
Branch Preview URL: | https://449-new-modal-for-logs-logge.react-science.pages.dev |
Usage:
import { FifoLogger } from 'fifo-logger';
const fifoLogger = new FifoLogger();
function App() {
return (
<FifoLoggerProvider logger={fifoLogger}>
// ...
<FifoLoggerToolbarItem />
</FifoLoggerProvider>
);
}
To add logs:
function ComponentAddingLogs() {
const logger = useFifoLogger();
// In callback / useEffect
logger.info('info');
}
To get render something when the logs are updated:
function ComponentThatNeedsLogs() {
const logs = useFifoLogs();
}
@lpatiny This PR is awaiting your review
@moonayyur can you have a look as well? Because you designed a similar component in pixelium and the goal is to replace it with this one.
Closes: https://github.com/zakodium-oss/react-science/issues/449