-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
breaking: multiple elements in a single response (#124)
* wip: examples 01 dev * hack with _ssr, not ideal though * examples 02 * simplify waku/client usage * example 03 * example 04 * improve example 04 * examples 05 * example 06 * fix example 06 * support children * wip: waku/router, which is tough one * rename from Server to Slot * wip: fix router * refactor consistent names * wip: fix router * add react hooks eslint plugin * improve prefetched * fix example 08 * fix example 09 * fix test * wip: ssr config * fix ex 06 * fix waku/router * wip: website * fix interleaveHtmlSnippets * remove unstable_rootDir * fix router build * fix explicit index path (suboptimal?) * this should be a proper fix * website: use path prop #84 * fix action and improve example/06 * re-design router input string and allow client cache control * update website * make initialInput prop optional * use "" for initial input for simplicity * fix and a workaround for empty input string, seems suboptimal..
- Loading branch information
Showing
83 changed files
with
1,377 additions
and
1,097 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { lazy } from "react"; | ||
|
||
import { defineEntries } from "waku/server"; | ||
|
||
const App = lazy(() => import("./components/App.js")); | ||
|
||
export default defineEntries( | ||
// renderEntries | ||
async (input) => { | ||
return { | ||
App: <App name={input || "Waku"} />, | ||
}; | ||
}, | ||
// getBuildConfig | ||
async () => { | ||
return { | ||
"/": { | ||
entries: [[""]], | ||
}, | ||
}; | ||
}, | ||
// getSsrConfig | ||
async () => ({ | ||
getInput: (pathStr) => { | ||
switch (pathStr) { | ||
case "/": | ||
return ""; | ||
default: | ||
return null; | ||
} | ||
}, | ||
filter: (elements) => elements.App, | ||
}), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { lazy } from "react"; | ||
|
||
import { defineEntries } from "waku/server"; | ||
|
||
const App = lazy(() => import("./components/App.js")); | ||
|
||
export default defineEntries( | ||
// renderEntries | ||
async (input) => { | ||
return { | ||
App: <App name={input || "Waku"} />, | ||
}; | ||
}, | ||
// getBuildConfig | ||
async () => { | ||
return { | ||
"/": { | ||
entries: [[""]], | ||
}, | ||
}; | ||
}, | ||
// getSsrConfig | ||
async () => ({ | ||
getInput: (pathStr) => { | ||
switch (pathStr) { | ||
case "/": | ||
return ""; | ||
default: | ||
return null; | ||
} | ||
}, | ||
filter: (elements) => elements.App, | ||
}), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { lazy } from "react"; | ||
|
||
import { defineEntries } from "waku/server"; | ||
import { Children } from "waku/client"; | ||
|
||
const App = lazy(() => import("./components/App.js")); | ||
|
||
export default defineEntries( | ||
// renderEntries | ||
async (input) => { | ||
return { | ||
App: ( | ||
<App name={input || "Waku"}> | ||
<Children /> | ||
</App> | ||
), | ||
}; | ||
}, | ||
// getBuildConfig | ||
async () => { | ||
return { | ||
"/": { | ||
entries: [[""]], | ||
}, | ||
}; | ||
}, | ||
// getSsrConfig | ||
async () => ({ | ||
getInput: (pathStr) => { | ||
switch (pathStr) { | ||
case "/": | ||
return ""; | ||
default: | ||
return null; | ||
} | ||
}, | ||
filter: (elements) => elements.App, | ||
}), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { lazy } from "react"; | ||
|
||
import { defineEntries } from "waku/server"; | ||
|
||
const App = lazy(() => import("./components/App.js")); | ||
|
||
export default defineEntries( | ||
// renderEntries | ||
async (input) => { | ||
return { | ||
App: <App name={input || "Waku"} />, | ||
}; | ||
}, | ||
// getBuildConfig | ||
async () => { | ||
return { | ||
"/": { | ||
entries: [[""]], | ||
}, | ||
}; | ||
}, | ||
// getSsrConfig | ||
async () => ({ | ||
getInput: (pathStr) => { | ||
switch (pathStr) { | ||
case "/": | ||
return ""; | ||
default: | ||
return null; | ||
} | ||
}, | ||
filter: (elements) => elements.App, | ||
}), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
bf9a0fb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
waku – ./
waku.vercel.app
waku-git-main-daishi.vercel.app
waku-daishi.vercel.app
waku.gg
www.waku.gg