Skip to content

Commit

Permalink
feat: ssr support
Browse files Browse the repository at this point in the history
  • Loading branch information
brofrain committed Oct 27, 2023
1 parent 9d1a130 commit 2dc6af4
Show file tree
Hide file tree
Showing 20 changed files with 4,116 additions and 78 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dist
node_modules
target

# Editor directories and files
Expand Down
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ leptos = { version = "0.5.2" }
wasm-bindgen = { version = "0.2.87" }
web-sys = { version = "0.3.64", features = ["DomRect"] }

[features]
ssr = []
hydrate = []

[package.metadata.cargo-all-features]
skip_feature_sets = [["ssr", "hydrate"]]

[lints.rust]
unsafe_code = "forbid"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ view! {

- `appear` - if true, the enter transition triggers for all children on initial `<AnimatedFor />` render.

Example usage with [Tailwind CSS](https://tailwindcss.com/):
Example usage with [TailwindCSS](https://tailwindcss.com/):

```rs
view! {
Expand Down
4 changes: 2 additions & 2 deletions examples/csr/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tailwind CSS SPA example
# TailwindCSS SPA example

This example presents use of `<AnimatedFor ... />` in combination with [Tailwind CSS](https://tailwindcss.com/).
This example presents use of `<AnimatedFor ... />` in combination with [TailwindCSS](https://tailwindcss.com/).

## Running the application using [Trunk](https://trunkrs.dev/)

Expand Down
8 changes: 8 additions & 0 deletions examples/ssr/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"rust-analyzer.check.command": "clippy",
"rust-analyzer.cargo.features": ["hydrate"],
"rust-analyzer.procMacro.ignored": {
"leptos_macro": ["component"]
},
"rust-analyzer.rustfmt.overrideCommand": ["just", "_vscode-fmt"]
}
Loading

0 comments on commit 2dc6af4

Please sign in to comment.