All entries

    Build a React Form from JSON Schema

    Build an actor configuration form from a small JSON Schema, starting with strings, enum choices and one nested object.

    A schema blueprint points to an interactive clipboard form
    Conceptual pixel-art illustration.

    Build an actor configuration form from a small JSON Schema, starting with strings, enum choices and one nested object. Keep the schema as the shared validation contract.

    Build the example

    Give a fictional scraper a required mode with values summary and full, plus options.maxPages as an integer from 1 to 20. Map enum to a select and object properties to nested field groups. Keep numeric input as text while editing so a blank field stays blank, then parse on submit. Use the same schema in the server validator, since callers can send arbitrary JSON without opening the form.

    Before rendering, write an example of each field’s initial value. Keep the number blank until there is input, leave the optional object absent and select no enum default unless the workflow requires it. Submit an object with an extra property and decide explicitly whether your schema permits it. Use that rule on both sides.

    Teaching example
    {"type":"object","required":["mode"],"properties":{"mode":{"enum":["summary","full"]},"options":{"type":"object","properties":{"maxPages":{"type":"integer","minimum":1,"maximum":20}}}}}

    Watch the failure boundary

    Different schema features need different widgets. A required checkbox means the property must be present, so false is still a valid boolean unless the schema constrains its value. An optional nested object can remain absent until the user adds it. Keep a small mapping of supported features and reject unsupported forms with a clear reason.

    Verify the behavior

    Send maxPages as 0 and then as the string "5". Both should fail against the integer constraint. Surface server errors at their field paths and retain input on failure. Document how the renderer behaves with unknown keywords or mutually exclusive subschemas before accepting third-party schemas.

    FURTHER READING

    Sources

    Technical references checked .

    END OF ENTRY / 34
    Eeshan Singh with Big Ben in London
    BEHIND THE JOURNAL

    Eeshan Singh

    I’m Eeshan Singh Pokharia, an AI Full Stack Developer and CoFounder of UltraFit360. I work across AI features, full-stack product development, and web and mobile experiences—from Figma and frontend interactions to the systems behind them.

    Different schema features need different widgets. A required checkbox means the property must be present, so false is still a valid boolean unless the schema constrains its value. An optional nested object can remain absent until the user adds it. Keep a small mapping of supported features and reject unsupported forms with a clear reason.

    Meet the author
    THE CONVERSATION

    Your side of the story.