mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[DOC] move reference doc in subfolder
This commit is contained in:
+4
-4
@@ -79,7 +79,7 @@ additional tools, we made a lot of effort to make the most of the web platform.
|
||||
|
||||
For example, Owl uses the standard `xml` parser that comes with every browser.
|
||||
Because of that, Owl did not have to write its own template parser. Another
|
||||
example is the [`xml`](tags.md#xml-tag) tag helper function, which makes use of
|
||||
example is the [`xml`](reference/tags.md#xml-tag) tag helper function, which makes use of
|
||||
native template literals to allow in a natural way to write `xml` templates
|
||||
directly in the javascript code. This can be easily integrated with editor
|
||||
plugins to have autocompletion inside the template.
|
||||
@@ -127,7 +127,7 @@ structured than a template language. Note that the tooling is quite impressive:
|
||||
there is a syntax highlighter for jsx here on github!
|
||||
|
||||
By comparison, here is the equivalent Owl component, written with the
|
||||
[`xml`](tags.md#xml-tag) tag helper:
|
||||
[`xml`](reference/tags.md#xml-tag) tag helper:
|
||||
|
||||
```js
|
||||
class Clock extends Component {
|
||||
@@ -251,7 +251,7 @@ keeps track of who get data, and retrigger a render when it was changed.
|
||||
Owl store is a little bit like a mix of redux and vuex: it has actions (but not
|
||||
mutations), and like VueX, it keeps track of the state changes. However, it does
|
||||
not notify a component when the state changes. Instead, components need to connect
|
||||
to the store like in redux, with the `useStore` hook (see the [store documentation](store.md#connecting-a-component)).
|
||||
to the store like in redux, with the `useStore` hook (see the [store documentation](reference/store.md#connecting-a-component)).
|
||||
|
||||
```javascript
|
||||
const actions = {
|
||||
@@ -314,7 +314,7 @@ This work is based on the new ideas introduced by React hooks.
|
||||
|
||||
From the way React and Vue introduce their hooks, it may look like hooks are not
|
||||
compatible with class components. However, this is not the case, as shown by
|
||||
Owl [hooks](hooks.md). They are inspired by both React and Vue. For example,
|
||||
Owl [hooks](reference/hooks.md). They are inspired by both React and Vue. For example,
|
||||
the `useState` hook is named after React, but its API is closer to the `reactive`
|
||||
Vue hook.
|
||||
|
||||
|
||||
+13
-13
@@ -50,19 +50,19 @@ Note that for convenience, the `useState` hook is also exported at the root of t
|
||||
|
||||
## Reference
|
||||
|
||||
- [Animations](animations.md)
|
||||
- [Component](component.md)
|
||||
- [Context](context.md)
|
||||
- [Event Bus](event_bus.md)
|
||||
- [Hooks](hooks.md)
|
||||
- [Misc](misc.md)
|
||||
- [Observer](observer.md)
|
||||
- [QWeb](qweb.md)
|
||||
- [Router](router.md)
|
||||
- [Store](store.md)
|
||||
- [Tags](tags.md)
|
||||
- [Utils](utils.md)
|
||||
- [Virtual DOM](vdom.md)
|
||||
- [Animations](reference/animations.md)
|
||||
- [Component](reference/component.md)
|
||||
- [Context](reference/context.md)
|
||||
- [Event Bus](reference/event_bus.md)
|
||||
- [Hooks](reference/hooks.md)
|
||||
- [Misc](reference/misc.md)
|
||||
- [Observer](reference/observer.md)
|
||||
- [QWeb](reference/qweb.md)
|
||||
- [Router](reference/router.md)
|
||||
- [Store](reference/store.md)
|
||||
- [Tags](reference/tags.md)
|
||||
- [Utils](reference/utils.md)
|
||||
- [Virtual DOM](architecture/vdom.md)
|
||||
|
||||
## Learning Resources
|
||||
|
||||
|
||||
@@ -986,7 +986,7 @@ of the props. Here is how it works in Owl:
|
||||
- `props` key is a static key (so, different from `this.props` in a component instance)
|
||||
- it is optional: it is ok for a component to not define a `props` key.
|
||||
- props are validated whenever a component is created/updated
|
||||
- props are only validated in `dev` mode (see [tooling page](tooling.md#development-mode))
|
||||
- props are only validated in `dev` mode (see [tooling page](../tooling.md#development-mode))
|
||||
- if a key does not match the description, an error is thrown
|
||||
- it validates keys defined in (static) `props`. Additional keys given by the
|
||||
parent will cause an error.
|
||||
@@ -121,7 +121,7 @@ Its API is quite simple:
|
||||
```
|
||||
|
||||
- **`render(name, context, extra)`**: renders a template. This returns a `vnode`,
|
||||
which is a virtual representation of the DOM (see [vdom doc](vdom.md)).
|
||||
which is a virtual representation of the DOM (see [vdom doc](../architecture/vdom.md)).
|
||||
|
||||
```js
|
||||
const vnode = qweb.render("App", component);
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
Tags are very small helpers to make it easy to write inline templates. There is
|
||||
only one currently available tag: `xml`, but we plan to add other tags later,
|
||||
such as a `css` tag, which will be used to write [single file components](tooling.md#single-file-component).
|
||||
such as a `css` tag, which will be used to write [single file components](../tooling.md#single-file-component).
|
||||
|
||||
## XML tag
|
||||
|
||||
+2
-2
@@ -64,8 +64,8 @@ It is very useful to group code by feature instead of by type of file. It makes
|
||||
it easier to scale application to larger size.
|
||||
|
||||
To do so, Owl currently has a small helper that makes it easy to define a
|
||||
template inside a javascript (or typescript) file: the [`xml`](tags.md#xml-tag)
|
||||
helper. With this, a template is automatically registered to [QWeb](qweb.md).
|
||||
template inside a javascript (or typescript) file: the [`xml`](reference/tags.md#xml-tag)
|
||||
helper. With this, a template is automatically registered to [QWeb](reference/qweb.md).
|
||||
|
||||
This means that the template and the javascript code can be defined in the same
|
||||
file. It is not currently possible to add css to the same file, but Owl may
|
||||
|
||||
Reference in New Issue
Block a user