Skip to content

[V2] Protocol: mark errors prop required #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions resources/js/Pages/the-protocol.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function () {
</head>
<body>

<div id="app" data-page='{"component":"Event","props":{"event":{"id":80,"title":"Birthday party","start_date":"2019-06-02","description":"Come out and celebrate Jonathan&apos;s 36th birthday party!"}},"url":"/events/80","version":"c32b8e4965f418ad16eaebba1d4e960f"}'></div>
<div id="app" data-page='{"component":"Event","props":{"errors":{},"event":{"id":80,"title":"Birthday party","start_date":"2019-06-02","description":"Come out and celebrate Jonathan&apos;s 36th birthday party!"}},"url":"/events/80","version":"c32b8e4965f418ad16eaebba1d4e960f"}'></div>

</body>
</html>
Expand Down Expand Up @@ -111,6 +111,7 @@ export default function () {
{
"component": "Event",
"props": {
"errors": {},
"event": {
"id": 80,
"title": "Birthday party",
Expand All @@ -137,7 +138,8 @@ export default function () {
<Strong>component:</Strong> The name of the JavaScript page component.
</Li>
<Li>
<Strong>props:</Strong> The page props (data).
<Strong>props:</Strong> The page props. Contains all of the page data along with an <Code>errors</Code> object
(defaults to <Code>{}</Code> if there are no errors).
</Li>
<Li>
<Strong>url:</Strong> The page URL.
Expand Down Expand Up @@ -270,7 +272,8 @@ export default function () {
"props": {
"auth": {...}, // NOT included
"categories": [...], // NOT included
"events": [...] // included
"events": [...], // included
"errors": {} // always included
},
"url": "/events/80",
"version": "c32b8e4965f418ad16eaebba1d4e960f"
Expand Down