Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#2,972 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Nikhil-Nandagopal ci sta già lavorando.

Dal 3/12/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Documentation User Education Pod
Problem Statement

Hello,

I was reading the documentation on Use Appsmith store and I noticed that the code example provided does not represent a good practice, since a getter (fetch_name) is simultaneously acting as a setter.

The Issue: The function is intended to retrieve data, but it explicitly calls storeValue('name', 'sam', true). This means the function mutates the store every time it is called to read it.

Current Example in Docs:
export default {
	fetch_name () {
		storeValue('name', 'sam', true); // 👈🏼 This sets the value instead of just fetching it
		return appsmith.store.name;
	},
	update_name () {
		storeValue('name', 'ben', true);
		return appsmith.store.name;
	},
}
Use Cases / User query reference
Proposed Changes:

I suggest updating the example to clearly separate the concerns (Get vs. Set)

export default {
    // Pure getter
    fetch_name () {
        return appsmith.store.name;
    },
    
    // Setter
    update_name () {
        storeValue('name', 'ben', true);
        return appsmith.store.name;
    },
}

This change would make the distinction between reading from the store and writing to the store much clearer for new users.

BR

Audio/Video Recording

No response

Product Requirements Document

No response

Other Relevant Links

No response

Checklist
  • Reviewed existing documentation to ensure this request is not duplicated.
  • Attached relevant media or supporting materials like links to the PRD, feature recordings, Slack or Discord links, and any other relevant resources.
Lingua principale
MDX
Stelle
98
Fork
302
Merge medio
21h 47m
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di appsmithorg/appsmith-docs

Tutte le issue di appsmithorg/appsmith-docs

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.