Skip to content
Myr

docs: updated sponsor links

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Michel Weststrate · committed by Michel Weststrate · parent f3f7f1f · Browse files · 24 files+71 added−25 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

24 files+71 added−25 removed

  • other:+71 added−25 removed

24 files+71 added−25 removed

modified:docs/api.md+3 added-1 removed
modified:docs/async.md+3 added-1 removed
modified:docs/built-with.md+4 added-2 removed
modified:docs/complex-objects.md+3 added-1 removed
1 unmodified line
2id: complex-objects3title: Classes4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>910Plain objects (objects without a prototype), arrays, `Map`s and `Set`s are always drafted by Immer. Every other object must use the `immerable` symbol to mark itself as compatible with Immer. When one of these objects is mutated within a producer, its prototype is preserved between copies.1112```js
61 unmodified lines
modified:docs/current.md+3 added-1 removed
modified:docs/curried-produce.md+3 added-1 removed
1 unmodified line
2id: curried-produce3title: Curried producers4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>910<details>11 <summary style="color: white; background:#c200c2;padding:5px;margin:5px;border-radius:2px">egghead.io lesson 6: Simplify code by using curried _reduce_</summary>12 <br>
59 unmodified lines
modified:docs/example-reducer.md+3 added-1 removed
1 unmodified line
2id: example-reducer3title: Example Reducer4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>910<details>11 <summary style="color: white; background:#c200c2;padding:5px;margin:5px;border-radius:2px">egghead.io lesson 13: Using Immer in a (React) reducer</summary>12 <br>
47 unmodified lines
modified:docs/example-setstate.md+3 added-1 removed
1 unmodified line
2id: example-setstate3title: React setState example4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>910<details>11 <summary style="color: white; background:#c200c2;padding:5px;margin:5px;border-radius:2px">egghead.io lesson 8: Using Immer with _useState_. Or: _useImmer_</summary>12 <br>
33 unmodified lines
modified:docs/faq.md+3 added-1 removed
2 unmodified lines
3title: Frequently Asked Questions4sidebar_label: FAQ5---67<div id="codefund"><!-- fallback content --></div>7<center>8<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>9</center>1011## Q: How does Immer work?1213Read the (second part of the) [introduction blog](https://medium.com/@mweststrate/introducing-immer-immutability-the-easy-way-9d73d8f71cb3).
32 unmodified lines
modified:docs/freezing.md+3 added-1 removed
1 unmodified line
2id: freezing3title: Auto freezing4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>910<details>11 <summary style="color: white; background:#c200c2;padding:5px;margin:5px;border-radius:2px">egghead.io lesson 7: Immer automatically freezes data</summary>12 <br>
11 unmodified lines
modified:docs/installation.md+3 added-1 removed
1 unmodified line
2id: installation3title: Installation4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>910Immer can be installed as a direct dependency, and will work in any ES5 environment:1112- Yarn: `yarn add immer`
66 unmodified lines
modified:docs/introduction.md+3 added-1 removed
2 unmodified lines
3title: Introduction to Immer4sidebar_label: Introduction5---67<div id="codefund"><!-- fallback content --></div>7<center>8<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>9</center>1011<img src="/immer/img/immer-logo.svg" height="200px" align="right"/>1213# Immer
53 unmodified lines
modified:docs/map-set.md+3 added-1 removed
1 unmodified line
2id: map-set3title: Map and Set4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>910_⚠ Since version 6 support for `Map`s and `Set`s has to be enabled explicitly by calling [`enableMapSet()`](installation#pick-your-immer-version) once when starting your application._1112Plain objects, arrays, `Map`s and `Set`s are always drafted by Immer. An example of using Maps with immer:
48 unmodified lines
modified:docs/original.md+3 added-1 removed
2 unmodified lines
3title: Extracting the original state from a draft4sidebar_label: Original5---67<div id="codefund"><!-- fallback content --></div>7<center>8<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>9</center>1011Immer exposes a named export `original` that will get the original object from the proxied instance inside `produce` (or return `undefined` for unproxied values). A good example of when this can be useful is when searching for nodes in a tree-like state using strict equality.1213```js
21 unmodified lines
modified:docs/patches.md+3 added-1 removed
1 unmodified line
2id: patches3title: Patches4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>910<details>11 <summary style="color: white; background:#c200c2;padding:5px;margin:5px;border-radius:2px">egghead.io lesson 14: Capture patches using _produceWithPatches_</summary>12 <br>
164 unmodified lines
modified:docs/performance.md+3 added-1 removed
1 unmodified line
2id: performance3title: Immer performance4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>910<details>11 <summary style="color: white; background:#c200c2;padding:5px;margin:5px;border-radius:2px">egghead.io lesson 5: Leveraging Immer's structural sharing in React</summary>12 <br>
35 unmodified lines
modified:docs/pitfalls.md+3 added-1 removed
1 unmodified line
2id: pitfalls3title: Pitfalls4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>9101. For performance tips, see [Performance Tips](https://immerjs.github.io/immer/docs/performance/#performance-tips).111. Don't redefine draft like, `draft = myCoolNewState`. Instead, either modify the `draft` or return a new state. See [Returning data from producers](https://immerjs.github.io/immer/docs/return).121. Immer assumes your state to be a unidirectional tree. That is, no object should appear twice in the tree, and there should be no circular references.
22 unmodified lines
modified:docs/produce.md+3 added-1 removed
1 unmodified line
2id: produce3title: Using produce4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>910<details>11 <summary style="color: white; background:#c200c2;padding:5px;margin:5px;border-radius:2px">egghead.io lesson 3: Simplifying deep updates with _produce_</summary>12 <br>
51 unmodified lines
modified:docs/resources.md+3 added-1 removed
1 unmodified line
2id: resources3title: External resources4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>910- Blog: [The Rise of Immer in React](https://www.netlify.com/blog/2018/09/12/the-rise-of-immer-in-react/)11- Blog: by Workday Prism on why they picked Immer to manage immutable state [The Search for a Strongly-Typed, Immutable State](https://medium.com/workday-engineering/workday-prism-analytics-the-search-for-a-strongly-typed-immutable-state-a09f6768b2b5)12- Blog: [Immutability in React and Redux: The Complete Guide](https://daveceddia.com/react-redux-immutability-guide/)
6 unmodified lines
modified:docs/return.md+3 added-1 removed
1 unmodified line
2id: return3title: Returning new data from producers4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>910<details>11 <summary style="color: white; background:#c200c2;padding:5px;margin:5px;border-radius:2px">egghead.io lesson 9: Returning completely new state</summary>12 <br>
111 unmodified lines
modified:docs/support.md+3 added-1 removed
1 unmodified line
2id: support3title: Supporting immer4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>910Immer currently has 350.000 dependents on GitHub, and has almost 10.000.000 downloads per month. However, only the first 2 days of development has been sponsored (by Mendix), and all the development and maintenance after that has been a labor of love.1112If you are enjoying Immer, and you are grateful for the package, or want to ensure its longevity, consider sponsoring the open collective on https://opencollective.com/immer or make a one time donation using [PayPal](https://www.paypal.me/michelweststrate).
modified:docs/typescript.md+3 added-1 removed
2 unmodified lines
3title: Using TypeScript or Flow4sidebar_label: TypeScript / Flow5---67<div id="codefund"><!-- fallback content --></div>7<center>8<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>9</center>1011<details>12 <summary style="color: white; background:#c200c2;padding:5px;margin:5px;border-radius:2px">egghead.io lesson 12: Immer + TypeScript</summary>13 <br>
119 unmodified lines
modified:docs/update-patterns.md+3 added-1 removed
1 unmodified line
2id: update-patterns3title: Update patterns4---56<div id="codefund"><!-- fallback content --></div>6<center>7<div data-ea-publisher="immerjs" data-ea-type="image" class="horizontal bordered"></div>8</center>910Working with immutable data, before Immer, used to mean learning all the immutable update patterns.1112To help 'unlearning' those patterns here is an overview how you can leverage the built-in JavaScript APIs to update objects and collections:
134 unmodified lines
modified:website/siteConfig.js+1 added-1 removed
70 unmodified lines
7172 // Add custom scripts here that would be placed in <script> tags.73 scripts: [74 "https://buttons.github.io/buttons.js",75 "https://codefund.io/properties/439/funder.js"75 "https://media.ethicalads.io/media/client/ethicalads.min.js"76 ],7778 // On page navigation for the current documentation page.79 onPageNav: "separate",
23 unmodified lines