From 78e67a2f60e2d8e7bc33a1755ab3cca77f0f61e3 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Mon, 21 Jun 2021 16:02:50 -0400 Subject: [PATCH] Fixing relative README links and adding link to demo --- src/LiveComponent/README.md | 8 +++++--- src/TwigComponent/README.md | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/LiveComponent/README.md b/src/LiveComponent/README.md index 685c9a7bcca..9b8ab0e1c7e 100644 --- a/src/LiveComponent/README.md +++ b/src/LiveComponent/README.md @@ -3,7 +3,7 @@ **EXPERIMENTAL** This component is currently experimental and is likely to change, or even change drastically. -Live components work with the [TwigComponent](../TwigComponent) +Live components work with the [TwigComponent](https://github.com/symfony/ux-twig-component) library to give you the power to automatically update your Twig components on the frontend as the user interacts with them. Inspired by [Livewire](https://laravel-livewire.com/) and @@ -62,6 +62,8 @@ class ProductSearchComponent implements LiveComponentInterface As a user types into the box, the component will automatically re-render and show the new results! +Want a demo? Check out https://github.com/weaverryan/live-demo. + ## Installation Let's get started! Install the library with: @@ -94,7 +96,7 @@ That's it! We're ready! ## Making your Component "Live" -If you haven't already, check out the [Twig Component](../TwigComponent) +If you haven't already, check out the [Twig Component](https://github.com/symfony/ux-twig-component) documentation to get the basics of Twig components. Suppose you've already built a basic Twig component: @@ -220,7 +222,7 @@ be set when rendering. Most properties will be LiveProps, with common exceptions being properties that hold services (these don't need to be stateful because they will be autowired each time before the component is rendered) and -[properties used for computed properties](../TwigComponent/README.md#computed-properties). +[properties used for computed properties](https://github.com/symfony/ux-twig-component/blob/main/README.md#computed-properties). ## data-action="live#update": Re-rendering on LiveProp Change diff --git a/src/TwigComponent/README.md b/src/TwigComponent/README.md index dba56817fa5..494002439b5 100644 --- a/src/TwigComponent/README.md +++ b/src/TwigComponent/README.md @@ -44,12 +44,14 @@ Done! Now render it wherever you want: Enjoy your new component! -![Example of the AlertComponent](./alert-example.png) +![Example of the AlertComponent](https://github.com/symfony/ux-twig-component/blob/main/alert-example.png?raw=true) This brings the familiar "component" system from client-side frameworks -into Symfony. Combine this with [Live Components](../LiveComponent), +into Symfony. Combine this with [Live Components](https://github.com/symfony/ux-live-component), to create an interactive frontend with automatic, Ajax-powered rendering. +Want a demo? Check out https://github.com/weaverryan/live-demo. + ## Installation Let's get this thing installed! Run: @@ -271,7 +273,7 @@ method and called that from the template via `this.products`. This was done because, as a general rule, you should make your components as _lazy_ as possible and store only the information you need on its properties (this also helps if you convert your component to a -[live component](../LiveComponent)) later. With this setup, the +[live component](https://github.com/symfony/ux-live-component)) later. With this setup, the query is only executed if and when the `getProducts()` method is actually called. This is very similar to the idea of "computed properties" in frameworks like [Vue](https://v3.vuejs.org/guide/computed.html).