[Docs]: Misleading logic in "Use Appsmith store" example (fetch_name)
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
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
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di appsmithorg/appsmith-docs
-
[Docs]: Example docker-compose file causes git timeouts on WindowsForse di nuovo libera @Nikhil-Nandagopal l’ha presa 70 giorni fa e non c’è nessuna pull request aperta. ApertaDocumentation User Education Pod
appsmithorg/appsmith-docs#3026 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
appsmithorg/appsmith-docs#2960 ·
I maintainer di solito rispondono entro 1 giorno
-
[Docs]:Forse di nuovo libera @Nikhil-Nandagopal l’ha presa 418 giorni fa e non c’è nessuna pull request aperta. ApertaDocumentation User Education Pod
appsmithorg/appsmith-docs#2940 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Docs]:Forse di nuovo libera @Nikhil-Nandagopal l’ha presa 418 giorni fa e non c’è nessuna pull request aperta. ApertaDocumentation User Education Pod
appsmithorg/appsmith-docs#2939 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Docs]:Forse di nuovo libera @Nikhil-Nandagopal l’ha presa 418 giorni fa e non c’è nessuna pull request aperta. ApertaDocumentation User Education Pod
appsmithorg/appsmith-docs#2938 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno