Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
docs: Update the language of the comparison with Forgetti
Browse files Browse the repository at this point in the history
  • Loading branch information
mohebifar committed Mar 12, 2024
1 parent 8264b9c commit bc5561a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apps/docs/pages/comparisons/forgetti.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { DynamicLiveCodeSandpack } from "@components/DynamicLiveCodeSandpack";

[Forgetti](https://github.com/lxsmnsyc/forgetti) is also another alternative tool made to optimize React components at build time to make it run faster at runtime. But, when it comes to more complicated patterns, it generates failing code. For example, loops and mutations can lead to generating code that does not work.

Disclaimer: This comparison is not meant to degrade any of the tools. It's just a comparison of the features and limitations of the tools.

| **Feature** | React Unforget | Forgetti |
| :----- | :----: | ----: |
| Basic components with no dependencies |||
Expand Down Expand Up @@ -37,7 +39,7 @@ export default function CounterWithMutationTracking() {

</DynamicLiveCodeSandpack>

Yay 🎉! It worked. Now let's make it a bit more complex. Remember the example from the home page of Unforget? Let's make the `text` value mutable.
It works for this simple case. Now let's make it a bit more complex. Remember the example from the home page of Unforget? Let's make the `text` value mutable.


```ts
Expand Down Expand Up @@ -127,7 +129,7 @@ export default function CounterWithMutationTracking() {
`}
</DynamicLiveCodeSandpack>

Oh no! It failed again.
It fails again.

Ok, one more test. Let's see how it handles alias analysis.

Expand Down Expand Up @@ -162,4 +164,4 @@ export default function App() {

</DynamicLiveCodeSandpack>

And it failed again. Click on the button and you will see that the value is not updated.
If you click on the button, you will see that the value is not updated.

0 comments on commit bc5561a

Please sign in to comment.