Skip to content

Conversation

@YasasBanuka
Copy link

Description

Refactored the example code in "Use Appsmith store" (Best Practices) to separate the getter and setter logic.

  • The previous example caused a side effect where fetching the name inadvertently reset it to the default value.
  • fetch_name is now a pure getter that uses a fallback (|| 'sam').
  • update_name handles the actual state change.

Pull request type

Check the appropriate box:

  • Review Fixes
  • Documentation Overhaul
  • Feature/Story
    • Link one or more Engineering Tickets
        • A-Force
  • Error in documentation
  • Maintenance

Documentation tickets

Link to one or more documentation tickets:

Checklist

From the below options, select the ones that are applicable:

  • Checked for Grammarly suggestions.
  • Adhered to the writing checklist.
  • Adhered to the media checklist.
  • Verified and updated cross-references or added redirect rules.
  • Tested the redirect rules on deploy preview.
  • Validated the modifications made to the content on the deploy preview.
  • Validated the CSS modifications on different screen sizes.

@vercel
Copy link

vercel bot commented Dec 17, 2025

@YasasBanuka is attempting to deploy a commit to the Appsmith Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Dec 17, 2025

CLA assistant check
All committers have signed the CLA.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: Misleading logic in "Use Appsmith store" example (fetch_name)

2 participants