Skip to content

Add React Class > Function Component Script#8974

Open
arman-boyakhchyan wants to merge 3 commits into
DevExpress:26_1from
arman-boyakhchyan:react-function-components-script-26-1
Open

Add React Class > Function Component Script#8974
arman-boyakhchyan wants to merge 3 commits into
DevExpress:26_1from
arman-boyakhchyan:react-function-components-script-26-1

Conversation

@arman-boyakhchyan

Copy link
Copy Markdown
Contributor

Usage:

node tools\react-class-function.js

Comment thread tools/react-class-function.js Outdated
const mainRegex = /class App extends React\.Component \{\n {8}render\(\) \{\n {12}return \(\n([\s\S]+?) {12}\);\n {8}\}\n {4}\}/gi
const exportDefaultRegex = /\n\s+?export default App;/gi

const specifiedPath = process.argv[2];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why argv[2]?

arman-boyakhchyan and others added 2 commits July 13, 2026 14:22
Co-authored-by: Vlada Skorokhodova <94827090+vladaskorohodova@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants