Skip to content

Commit 371a259

Browse files
Improve details
1 parent c85fb05 commit 371a259

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The package supports many features, like providers that accept arguments. But to
7373
<details>
7474
<summary><strong>If the widget tree structure is still not clear</strong>, click <strong>here</strong> to expand</summary>
7575
76-
### Widget tree structure
76+
### Expanded: Widget tree structure
7777
7878
To make things clear, here is the widget tree structure from the example above, shown in the most detailed form:
7979
@@ -150,7 +150,9 @@ Of course, the providers don’t need to be defined in the same scope to be used
150150
This kind of setup is not possible with Provider or other scoped DI libraries in the ecosystem — unless you resort to defining separate wrapper types like `MyModelWrapper1` and `MyModelWrapper2`, which adds complexity and makes the code harder to reason about.
151151
152152
<details>
153-
<summary><strong>If the difference is still not clear</strong>, click <strong>here</strong> to expand</summary>
153+
<summary><strong>If the difference between injection by type and injection by instance is still not clear</strong>, click <strong>here</strong> to expand</summary>
154+
155+
### Expanded: Comparing Injection: Typical Scoped DI vs. Disco
154156
155157
The table below highlights the core conceptual difference: traditional DI solutions inject based on **type**, whereas Disco injects based on **provider instances**. If Disco followed the same method-style API, it might look like `context.read(modelProvider)` — which is more intuitive in direct comparisons.
156158
@@ -163,10 +165,6 @@ Note that Disco intentionally flips the order — the provider comes first — t
163165
164166
</details>
165167
166-
<br>
167-
168-
You can find all the tradeoffs and design decisions summarized in the [full documentation](https://disco.mariuti.com).
169-
170168
### Examples
171169
172170
There are multiple examples on the repository:

docs/src/content/docs/index.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The package supports many features, like providers that accept arguments. But to
5757
<details>
5858
<summary><strong>If the widget tree structure is still not clear</strong>, click <strong>here</strong> to expand</summary>
5959

60-
### Widget tree structure
60+
### Expanded: Widget tree structure
6161

6262
To make things clear, here is the widget tree structure from the example above, shown in the most detailed form:
6363

@@ -134,7 +134,9 @@ Of course, the providers don’t need to be defined in the same scope to be used
134134
This kind of setup is not possible with Provider or other scoped DI libraries in the ecosystem — unless you resort to defining separate wrapper types like `MyModelWrapper1` and `MyModelWrapper2`, which adds complexity and makes the code harder to reason about.
135135

136136
<details>
137-
<summary><strong>If the difference is still not clear</strong>, click <strong>here</strong> to expand</summary>
137+
<summary><strong>If the difference between injection by type and injection by instance is still not clear</strong>, click <strong>here</strong> to expand</summary>
138+
139+
### Expanded: Comparing Injection: Typical Scoped DI vs. Disco
138140

139141
The table below highlights the core conceptual difference: traditional DI solutions inject based on **type**, whereas Disco injects based on **provider instances**. If Disco followed the same method-style API, it might look like `context.read(modelProvider)` — which is more intuitive in direct comparisons.
140142

packages/disco/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The package supports many features, like providers that accept arguments. But to
7373
<details>
7474
<summary><strong>If the widget tree structure is still not clear</strong>, click <strong>here</strong> to expand</summary>
7575
76-
### Widget tree structure
76+
### Expanded: Widget tree structure
7777
7878
To make things clear, here is the widget tree structure from the example above, shown in the most detailed form:
7979
@@ -150,7 +150,9 @@ Of course, the providers don’t need to be defined in the same scope to be used
150150
This kind of setup is not possible with Provider or other scoped DI libraries in the ecosystem — unless you resort to defining separate wrapper types like `MyModelWrapper1` and `MyModelWrapper2`, which adds complexity and makes the code harder to reason about.
151151
152152
<details>
153-
<summary><strong>If the difference is still not clear</strong>, click <strong>here</strong> to expand</summary>
153+
<summary><strong>If the difference between injection by type and injection by instance is still not clear</strong>, click <strong>here</strong> to expand</summary>
154+
155+
### Expanded: Comparing Injection: Typical Scoped DI vs. Disco
154156
155157
The table below highlights the core conceptual difference: traditional DI solutions inject based on **type**, whereas Disco injects based on **provider instances**. If Disco followed the same method-style API, it might look like `context.read(modelProvider)` — which is more intuitive in direct comparisons.
156158
@@ -163,10 +165,6 @@ Note that Disco intentionally flips the order — the provider comes first — t
163165
164166
</details>
165167
166-
<br>
167-
168-
You can find all the tradeoffs and design decisions summarized in the [full documentation](https://disco.mariuti.com).
169-
170168
### Examples
171169
172170
There are multiple examples on the repository:

0 commit comments

Comments
 (0)