Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pauleveritt/eleventy-jsx-async-runtime
Example of Preact, render, and context for a ticket in jsx-async-runtime.
https://github.com/pauleveritt/eleventy-jsx-async-runtime
Last synced: about 4 hours ago
JSON representation
Example of Preact, render, and context for a ticket in jsx-async-runtime.
- Host: GitHub
- URL: https://github.com/pauleveritt/eleventy-jsx-async-runtime
- Owner: pauleveritt
- Created: 2024-07-05T18:44:30.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-05T18:46:31.000Z (4 months ago)
- Last Synced: 2024-10-11T19:21:22.707Z (25 days ago)
- Language: TypeScript
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 11ty and jsx-async-runtime
Explain [a ticket in the jsx-async-runtime](https://github.com/jeasx/jsx-async-runtime/issues/1#issuecomment-2202170527)
repo about subcomponents and binding to `this`.We'd like to avoid prop drilling to subcomponents by allowing `this` to have access to render `data`. Preact can do this
with an extra arg to `render`. This arg becomes `this.context` in all components and subcomponents.[Demonstration video on YouTube](https://youtu.be/3y1-tuk2Z9E)
## Summary
1. Run `npm run build` (or start).
2. Look in `_site/index.html` at the `title` on the `
`.
3. It comes from `_includes/Heading.tsx` which has a comment explaining how it works.