Commit Graph

62 Commits

Author SHA1 Message Date
Saber Haj Rabiee e01dfbf497
fix: update to wasm-bindgen 0.2.93 (#2827) 2024-08-13 15:21:57 -07:00
Saber Haj Rabiee b3e2040ec9
chore: upgrade dependencies (#2765) 2024-08-10 20:01:41 -04:00
Greg Johnston 1d97494e19 fix: update syntax now that dispatch returns something 2024-08-03 11:52:09 -04:00
Greg Johnston 1f2b13a976 feat: allow `!Send` signals 2024-08-01 19:42:51 -04:00
Ben Wishovich c676cf921d Make get_configuration sync (#2647)
* Made get_configuraiton sync

* Update examples
2024-08-01 19:42:49 -04:00
Greg Johnston ce832cef21 rename from new_serde to new 2024-08-01 19:42:21 -04:00
Greg Johnston 6b60d48203 update counters_isomorphic 2024-08-01 19:41:36 -04:00
Saber Haj Rabiee d50012f8d4
chore: update gloo-net and reqwest to http 1.0 (closes #2688) (leptos 0.6) (#2751) 2024-08-01 19:39:54 -04:00
Greg Johnston f0c1061161
chore(ci): remove nightly feature on `counter_isomorphic` (#2510) 2024-04-09 13:18:37 -04:00
Sam Judelson ca07d29db5
stable examples change (#2497) 2024-04-04 20:11:28 -07:00
Joseph Cruz 97fd8ff6c4
fix(ci): leptos examples fail with bindgen schema error (#2428) 2024-03-13 22:33:54 -04:00
Greg Johnston fe64f0d332 examples: fix `counter_isomorphic` (broken in #2244) and fix additional warnings 2024-02-09 17:12:31 -05:00
Steffen 06721c5fcd
examples: fix typos in examples (#2260) 2024-02-05 05:20:53 -05:00
martin frances 0cba7bc22b
example/counter_isomorphic Removed console warning. (#2244)
This warning is seen in the browsers console window.

```
counter_isomorphic.js:1068 At src/counters.rs:138:17, you are reading a resource in `hydrate` mode outside a <Suspense/> or <Transition/>. This can cause hydration mismatch errors and loses out on a significant performance optimization. To fix this issue, you can either:
1. Wrap the place where you read the resource in a <Suspense/> or <Transition/> component, or
2. Switch to using create_local_resource(), which will wait to load the resource until the app is hydrated on the client side. (This will have worse performance in most cases.)
```

Two derived signals "value" and "error_msg" need to be wrapped in a <Suspense> block.

"value" falls back to just the initial text.
"error" uses the default fallback.
2024-02-01 16:50:15 -08:00
Greg Johnston 1b1e02729e clean up examples 2024-01-19 15:17:17 -05:00
Greg Johnston fdd576535a clean up examples 2024-01-19 15:14:39 -05:00
Greg Johnston 1d1de4ac38 remove `cfg-if` from all examples 2024-01-19 14:16:58 -05:00
Greg Johnston 31b2b9e94c remove explicit `handle_server_fns` in most cases because it's now included in `.leptos_routes()` 2024-01-19 14:16:58 -05:00
Trey Lowerison ed61ea9dd2
feat: add support for placing attributes on server functions (#2093)
* fix: add support for placing attributes on server functions

Adding instrumentation to server functions is not straightforward (requires calling out to another ssr-only function which is instrumented). This commit adds all attributes on the server function to both the generated front end and back end functions. If those attributes are only desirable on the backend say, a user can always wrap their attribute in `#[cfg_attr(feature = "ssr", ..)]`.

* nit: formatting in example cargo
2023-12-01 15:36:52 -05:00
Greg Johnston b578660624
docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
Joseph Cruz e384d53996
doc(examples): reference run instructions (#1705) 2023-09-13 19:57:50 -04:00
Joseph Cruz c11c4b0e3e
build(examples): make it easier to run examples (#1697)
* build(examples): support process management
* build(examples): manage trunk
* build(examples): manage cargo leptos
* doc(examples): add run instructions
2023-09-12 10:46:16 -04:00
Greg Johnston 7306ecccbc
feat: make struct name and path optional for server functions (#1573) 2023-08-24 10:22:35 -04:00
Greg Johnston dbc707adcd
feat/change: adopt reactive ownership model and drop `cx`/`Scope` (#918) 2023-08-21 19:31:37 -04:00
Joseph Cruz 8c5ab99fa7
build(examples): pull up compile tasks (#1417)
* build(examples): pull up compile tasks

* build(examples): set toolchain for compiles tasks

* build(examples): set toolchain for build and check

* build(examples): set toolchain of other examples
2023-07-24 11:35:34 -04:00
Greg Johnston 6b90e1babd
examples: add 404 support in Actix examples (closes #1031) (#1291) 2023-07-06 10:35:37 -04:00
Greg Johnston ee7dbafc85
change: migrate to `nightly` and `csr` features rather than `stable` and `default-features = false` (#1227) 2023-06-26 21:12:14 -04:00
Greg Johnston bb10b32200
feat: register server functions automatically (#1154) 2023-06-11 09:09:21 -04:00
agilarity 53e09279a2
ci(examples): verify examples (#1125) 2023-06-01 22:12:18 -04:00
agilarity 9997487a9c
test: lint examples with --all-features (#1008)
* test: lint all features

* fix(counter_isomorphic): check-style issues

* fix(errors_axum): check-style issues

* fix(hackernews): check-style issues

* fix(hackernews_axum): check-style issues

* fix(session_auth_axum): check-style issues

* build(session_auth_axum): add common tasks

* fix(ssr_modes): check-style issues

* build(ssr_modes_axum): add common tasks

* fix(ssr_modes_axum): check-style issues

* build(tailwind): add common tasks

* fix(tailwind): check-style issues

* fix(todo_app_sqlite_axum): check-style issues

* fix(todo_app_sqlite_viz): check-style issues
2023-05-05 22:25:29 -04:00
agilarity 9cf337309d
Fix lint issues in counter_isomorphic example (#980) 2023-05-02 20:22:07 -04:00
novacrazy 4b79a91287 Add profile.release to many examples 2023-04-06 21:53:52 -05:00
Michael Clayton 08b5970b2b
check EventSource value for Ok to avoid unwrap panic (#732) 2023-03-23 18:41:18 -04:00
Álvaro Mondéjar 509223ab2e
chore: Upgrade console_log to stable (#724) 2023-03-22 18:21:53 -04:00
Elliot Waite a9f778459a
examples: remove duplicate `console_error_panic_hook::set_once()` calls (#692) 2023-03-17 16:27:24 -04:00
Greg Johnston 38daaf3b72
chore: apply `cargo machete` systematically (#671) 2023-03-13 10:16:20 -04:00
Greg Johnston 4ff08f042b
change: pass `Scope` as argument into `Resource::read()` and `Resource::with()` (#542) 2023-02-19 19:52:31 -05:00
Greg Johnston 59ad6a4725 revert accident 2023-02-18 16:03:20 -05:00
Greg Johnston 884dacbc6c fix example 2023-02-18 16:02:19 -05:00
Greg Johnston 1dbcfe2861
change: reorganize module exports and reexports (#503) 2023-02-12 17:04:36 -05:00
Greg Johnston 6931d3904b
remove unnecessary `"openssl"` feature from Actix examples (#480) 2023-02-06 09:10:09 -05:00
Ben Wishovich 76aeb573bf
fix: convert `site_address` to `site_addr` to match `cargo-leptos` (#462) 2023-02-04 16:37:41 -05:00
Greg Johnston 6373fd42fb
Switch examples to `check` instead of `build` (for CI resources) and add missing examples (#437) 2023-02-01 20:36:37 -05:00
Greg Johnston 44974fcf69 Replace `site-address` with `site-addr` in `cargo-leptos` example `Cargo.toml` files 2023-01-26 19:52:47 -05:00
IcosaHedron f2e7b00d5a
Fix CSR with Trunk on hackernews example, remove CSR option from isomorphic example (#369)
* Fix CSR with Trunk on hackernews example

* Update isomorphic example to remove CSR from Readme
2023-01-25 20:15:12 -05:00
Kompreni bcabdddce5 doc: add link for leptos watch 2023-01-20 20:14:09 +01:00
ekanna ce0910caca Updated example code and README to use latest syntax for data binding 2023-01-17 12:08:44 +05:30
benwis 10a833d763 Switch get_configuration calls to None and add a note in the docs for
uses of get_configuration()
2023-01-15 12:50:25 -08:00
Greg Johnston f5f345e623
Merge pull request #286 from benwis/favicons
FAVICON!
2023-01-09 19:57:27 -05:00
benwis ee647cba1c Add Favicons to all the examples and standardize on the public folder for public assets 2023-01-09 15:27:52 -08:00