Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

docs: warn that useState should only contain JSON-serializable content - #5994

Merged
pi0 merged 6 commits into
mainfrom
docs/state-warning
Jul 21, 2022
Merged

docs: warn that useState should only contain JSON-serializable content#5994
pi0 merged 6 commits into
mainfrom
docs/state-warning

Conversation

@danielroe

@danielroedanielroe commented Jul 19, 2022

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#14326.

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Adds a brief warning about serializable content in useState. I haven't added similar warnings to data fetching composables as this is less likely to be an issue given that is originally coming over the wire as JSON, most likely, but I may change my mind, and happy to be convinced otherwise.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroedanielroe added the documentation Improvements or additions to documentation label Jul 19, 2022
@danielroe
danielroe requested a review from pi0July 19, 2022 13:46
@danielroedanielroe self-assigned this Jul 19, 2022
@netlify

netlifyBot commented Jul 19, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs ready!

NameLink
🔨 Latest commitb834be2
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/62d91449d01449000844138a
😎 Deploy Previewhttps://deploy-preview-5994--nuxt3-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Comment threaddocs/content/3.api/1.composables/use-state.md Outdated
@pi0

pi0 commented Jul 21, 2022

Copy link
Copy Markdown
Member

@danielroe Do you mind to simplify the explanation to be similar to the guide page? #5994 (comment)

Comment threaddocs/content/3.api/1.composables/use-state.md Outdated
Comment threaddocs/content/2.guide/2.features/6.state-management.md Outdated
Comment threaddocs/content/2.guide/2.features/6.state-management.md Outdated
pi0
pi0 approved these changes Jul 21, 2022
@pi0
pi0 merged commit d77b62d into mainJul 21, 2022
@pi0
pi0 deleted the docs/state-warning branch July 21, 2022 08:56
@pi0pi0 mentioned this pull request Aug 5, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xdocumentationImprovements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

useState array of objects can't access functions

4 participants

@danielroe@pi0@DamianGlowala@wireva