<div id="root">
</div>
const App = () => {
const exampleMemo = React.useMemo(() => 1 + 1, []);
const exampleCallback = React.useCallback(() => 1 + 1, []);
React.useEffect(() => {
console.log('useMemo', exampleMemo);
console.log('useCallback', exampleCallback);
})
return (
<div>
</div>
)
}
const root = ReactDOM.createRoot(document.querySelector('#root'));
root.render(<App />);
View Compiled
This Pen doesn't use any external CSS resources.