![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@hyperapp/logger
Advanced tools
Log Hyperapp state updates and action information to the console
A Hyperapp higher-order app
that logs state updates and action information to the console.
This example shows a counter that can be incremented or decremented. Go ahead and try it online with your browser console open to see the log messages.
import { h, app } from "hyperapp"
import { withLogger } from "@hyperapp/logger"
const state = {
count: 0
}
const actions = {
down: () => state => ({ count: state.count - 1 }),
up: () => state => ({ count: state.count + 1 })
}
const view = (state, actions) => (
<main>
<h1>{state.count}</h1>
<button onclick={actions.down} disabled={state.count <= 0}>
ー
</button>
<button onclick={actions.up}>+</button>
</main>
)
withLogger(app)(state, actions, view, document.body)
Install with npm / Yarn.
npm i @hyperapp/logger
Then with a module bundler like rollup or webpack use as you would anything else.
import { withLogger } from "@hyperapp/logger"
Download the minified library from the CDN.
<script src="https://unpkg.com/@hyperapp/logger"></script>
You can find the library in window.hyperappLogger
.
const { withLogger } = hyperappLogger
Compose the withLogger
function with your app
before calling it with the usual arguments.
import { withLogger } from "@hyperapp/logger"
withLogger(app)(state, actions, view, document.body)
// Or if you need to pass options
withLogger(options)(app)(state, actions, view, document.body)
options.log
Use it to customize the log function.
withLogger({
log(prevState, action, nextState) {
// format and send your log messages anywhere you like
}
})(app)(state, actions, view, document.body)
Hyperapp Logger is MIT licensed. See LICENSE.
FAQs
Log Hyperapp state updates and action information to the console
The npm package @hyperapp/logger receives a total of 55 weekly downloads. As such, @hyperapp/logger popularity was classified as not popular.
We found that @hyperapp/logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.