Skip to content

docs: add JS error-prone patterns for collections#3065

Open
matiasbenary wants to merge 2 commits into
masterfrom
docs/2123-js-error-prone-collections
Open

docs: add JS error-prone patterns for collections#3065
matiasbenary wants to merge 2 commits into
masterfrom
docs/2123-js-error-prone-collections

Conversation

@matiasbenary

Copy link
Copy Markdown
Contributor

Closes #2123

Adds a JavaScript tab to the Error prone patterns section of the collections page. the section only had Rust and Go.

Verified against the near-sdk-js source (develop):

  • Collections write to storage immediately: no write cache, no flush()
  • @view methods don't persist contract state (near-bindgen-exporter.ts only injects _saveToStorage for call/initialize/migrate).

The JS tab covers the patterns that actually apply (replace-without-clear, prefix collision, nested write-back) and drops the Rust-only flush()/mem::forget footgun.

@mintlify

mintlify Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
neardocs 🟢 Ready View Preview Jun 29, 2026, 5:29 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: NEW❗

Development

Successfully merging this pull request may close these issues.

[DOC] JS Examples for avoiding errors on Smart Contracts Anatomy

1 participant