
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
babel-plugin-realar
Advanced tools
Automatic observe jsx arrow functions for Realar for smartify and purify your code :+1:
That plugin for babel wraps all not wrapped arrow functions (that contains JSX) to Realar observe
function. Less code more effectivity!
import React from 'react';
import { box, shared, /* observe */ } from 'realar';
class Ticker {
@box value = 0;
next = () => this.value += 1;
}
const sharedTicker = () => shared(Ticker);
// const App = observe(() => {
const App = () => {
const { value, next } = sharedTicker();
return (
<>
Ticker: {value}
<br />
<button onClick={next}>Next</button>
</>
);
};
See wrapped version of it on CodeSandbox.
You are no need more to wrap (decorate) JSX components to observe
function! It will be automatic.
npm install --save-dev babel-plugin-realar
# or
yarn add babel-plugin-realar
And update your babel config:
// .babelrc
{
"plugins": [
"realar"
]
}
Enjoy and happy coding!
FAQs
Automatic observe jsx arrow functions for Realar
The npm package babel-plugin-realar receives a total of 1 weekly downloads. As such, babel-plugin-realar popularity was classified as not popular.
We found that babel-plugin-realar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.