Acronyms split the way programmers expect: XMLHttpRequest becomes xml_http_request, not x_m_l_http_request.
React Component Name Converter
PascalCase writes HelloWorldExample. React requires it. In JSX, a lowercase tag name is compiled to a string —
The Same Text in Other Cases
Case
Result
camelCase
helloWorldExample
snake_case
hello_world_example
SCREAMING_SNAKE_CASE
HELLO_WORLD_EXAMPLE
kebab-case
hello-world-example
Train-Case
Hello-World-Example
dot.case
hello.world.example
JSX Reads Capitalisation as Meaning
In JSX a lowercase tag compiles to a string —
Frequently Asked Questions
When should I use PascalCase?
React requires it. In JSX, a lowercase tag name is compiled to a string — `<button>` becomes the HTML element — while a capitalised one is treated as a variable reference. So a component named `myButton` renders nothing and produces no error; renaming it `MyButton` is what makes it work. The convention is enforced by the compiler, not by a style guide.
How are acronyms handled?
Correctly. `XMLHttpRequest` becomes `XmlHttpRequest`, treating the run of capitals as one word rather than splitting every letter.
Does the converter handle numbers and punctuation?
Numbers stay attached to the word they belong to; punctuation and separators are treated as word boundaries and removed. `order-2-total` and `order_2_total` both produce the same words.