Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore the old guide until the new guide is finished #326

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 5 additions & 18 deletions docs-src/0.6/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,18 @@
- [Component Lifecycle](reference/component_lifecycle.md) -->

- [Tutorial](guide/index.md)
- [Tooling setup](guide/tooling.md)
- [Creating a new app](guide/new_app.md)
- [Your First Component](guide/component.md)
- [Styling and Assets](guide/assets.md)
- [State and Interactivity](guide/state.md)
- [App Routing](guide/routing.md)
- [Data Fetching](guide/fetching.md)
- [More Platforms](guide/multiplatform.md)
- [Backend](guide/backend.md)
- [Deploying](guide/deploy.md)
- [Next Steps](guide/next_steps.md)
- [Your First Component](guide/your_first_component.md)
- [State](guide/state.md)
- [Data Fetching](guide/data_fetching.md)
- [Full Code](guide/full_code.md)

---

- [Essential Concepts](essentials/index.md)
- [Building UIs with RSX](essentials/rsx/index.md)
- [Component Lifecycle](essentials/lifecycle/index.md)
- [Managing State](essentials/state/index.md)
- [Breaking Out](essentials/breaking/index.md)
- [Structuring Your App](essentials/structure/index.md)
- [Building UIs with RSX](essentials/rsx/index.md)

---

Expand Down Expand Up @@ -96,11 +88,6 @@
- [Examples](cookbook/examples.md)
- [Tailwind](cookbook/tailwind.md)
- [Optimizing](cookbook/optimizing.md)
- [Migration for 0.5](migration/index.md)
- [Hooks](migration/hooks.md)
- [State](migration/state.md)
- [Fermi](migration/fermi.md)
- [Props](migration/props.md)

<!-- - [Static Generation](router/reference/static-generation.md) -->
<!-- - [CLI in Depth](router/reference/cli-in-depth.md)
Expand Down
10 changes: 9 additions & 1 deletion docs-src/0.6/src/essentials/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
essentials!
The essentials section will guide you through key concepts in Dioxus:

- [Building UIs with RSX](rsx/index.md) will teach you how to define html inside your Dioxus app with rsx.

- [Component Lifecycle](lifecycle/index.md) teaches you about the lifecycle of components along with the hooks you need to run code when the component is first created, mounted, and removed.

- [Managing State](state/index.md) guides you through how state works in Dioxus. It will teach you how to create state with `use_signal`, derive state with `use_memo`, and integrate state with asynchronous tasks with `use_resource`. Along the way, you will learn about you can use reactivity to declaratively describe your UI.

- [Breaking Out](breaking/index.md) will teach you how to break out of Dioxus' rendering model to run JavaScript or interact with the DOM directly with `web-sys`.
Empty file.
6 changes: 3 additions & 3 deletions docs-src/0.6/src/guide/state.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ These rules mean that there are certain things you can't do with hooks:

#### No Hooks in Conditionals
```rust
{{#include src/doc_examples/hooks_bad.rs:conditional}}
{{#include src/doc_examples/untested_05/hooks_bad.rs:conditional}}
```

#### No Hooks in Closures
```rust
{{#include src/doc_examples/hooks_bad.rs:closure}}
{{#include src/doc_examples/untested_05/hooks_bad.rs:closure}}
```

#### No Hooks in Loops
```rust
{{#include src/doc_examples/hooks_bad.rs:loop}}
{{#include src/doc_examples/untested_05/hooks_bad.rs:loop}}
```
12 changes: 6 additions & 6 deletions docs-src/0.6/src/guide/your_first_component.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dx new

The template contains some boilerplate to help you get started. For this guide, we will be rebuilding some of the code from scratch for learning purposes. You can clear the `src/main.rs` file. We will be adding new code in the next sections.

Next, let's setup our dependencies. We need to set up a few dependencies to work with the hacker news API:
Next, let's setup our dependencies. We need to set up a few dependencies to work with the hacker news API:

```sh
cargo add chrono --features serde
Expand All @@ -27,7 +27,7 @@ cargo add async_recursion

## Describing the UI

Now, we can define how to display a post. Dioxus is a *declarative* framework. This means that instead of telling Dioxus what to do (e.g. to "create an element" or "set the color to red") we simply *declare* how we want the UI to look.
Now, we can define how to display a post. Dioxus is a *declarative* framework. This means that instead of telling Dioxus what to do (e.g. to "create an element" or "set the color to red") we simply *declare* how we want the UI to look.

To declare what you want your UI to look like, you will need to use the `rsx` macro. Let's create a ``main`` function and an ``App`` component to show information about our story:

Expand All @@ -44,16 +44,16 @@ DemoFrame {
```

> RSX mirrors HTML. Because of this you will need to know some html to use Dioxus.
>
>
> Here are some resources to help get you started learning HTML:
> - [MDN HTML Guide](https://developer.mozilla.org/en-US/docs/Learn/HTML)
> - [W3 Schools HTML Tutorial](https://www.w3schools.com/html/default.asp)
>
>
> In addition to HTML, Dioxus uses CSS to style applications. You can either use traditional CSS (what this guide uses) or use a tool like [tailwind CSS](https://tailwindcss.com/docs/installation):
> - [MDN Traditional CSS Guide](https://developer.mozilla.org/en-US/docs/Learn/HTML)
> - [W3 Schools Traditional CSS Tutorial](https://www.w3schools.com/css/default.asp)
> - [Tailwind tutorial](https://tailwindcss.com/docs/installation) (used with the [Tailwind setup example](https://github.com/DioxusLabs/dioxus/tree/main/examples/tailwind))
>
> - [Tailwind tutorial](https://tailwindcss.com/docs/installation) (used with the [Tailwind setup example](https://github.com/DioxusLabs/dioxus/tree/v0.5/examples/tailwind))
>
> If you have existing html code, you can use the [translate](../CLI/translate.md) command to convert it to RSX. Or if you prefer to write html, you can use the [html! macro](https://github.com/DioxusLabs/dioxus-html-macro) to write html directly in your code.

## Dynamic Text
Expand Down
42 changes: 0 additions & 42 deletions docs-src/0.6/src/migration/fermi.md

This file was deleted.

59 changes: 0 additions & 59 deletions docs-src/0.6/src/migration/hooks.md

This file was deleted.

Loading