![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.
gatsby-plugin-react-decorators
Advanced tools
npm install gatsby-plugin-react-decorators
gastby-config.js
file// gatsby-config.js
const opts = require('gatsby-plugin-react-decorators').decoratorOptions;
module.exports = {
plugins: [
{
resolve: "gatsby-plugin-react-decorators",
options: {
react: {
options: opts.runtime | opts.ssr
},
reactDOM: {
options: opts.runtime | opts.ssr | opts.enableProfiler
}
},
}]
}
Note that the opts.enableProfiler
option (enabled by default) will enable the React profiler (as if you had added the --profile
option to gatsby build
/gatsby develop
, or manually specified react-dom/profiling
as a webpack alias for react-dom
).
If you're using decorators during the server-side render process, add the following to your gatsby-ssr.js
file:
// gatsby-ssr.js
import { registerDecorator } from 'webpack-decorators';
// This code can be executed immediately
const exampleDecorator = {
createElement: function(originalFunc, ...args) {
// Put your custom logic here...
return originalFunc(...args);
}
};
registerDecorator('react', exampleDecorator, 'createElement');
If you're using decorators during runtime (in the browser), add the following to your gatsby-browser.js
file:
// gatsby-browser.js
import { registerDecorator } from 'webpack-decorators';
export const onClientEntry = () => {
const exampleDecorator = {
createElement: function(originalFunc, ...args) {
// Put your custom logic here...
return originalFunc(...args);
}
};
registerDecorator('react', exampleDecorator, 'createElement');
};
Note:
You can register multiple decorators with multiple
registerDecorator
statements.
Package version 3.0 and up support React/React-Dom 17.0.1 and up.
FAQs
1. Install the package
The npm package gatsby-plugin-react-decorators receives a total of 643 weekly downloads. As such, gatsby-plugin-react-decorators popularity was classified as not popular.
We found that gatsby-plugin-react-decorators 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
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.