Skip to content

Commit

Permalink
feat(core): expose internal states and functions (#931)
Browse files Browse the repository at this point in the history
* feat(core): expose internal states and functions

* use createHandler

* refactor

* update docs

* update docs

* Revert "update docs"

This reverts commit 33b04d4.
  • Loading branch information
dai-shi authored Aug 15, 2024
1 parent 233e811 commit eac3442
Show file tree
Hide file tree
Showing 5 changed files with 301 additions and 253 deletions.
17 changes: 17 additions & 0 deletions docs/api/hacks/internals.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: 'Internals'
section: 'API'
subSection: 'Hacks'
description: ''
---

Valtio exposes some internal capabilities.
This isn't for app developers. Use it at your own risk.

# unstable_getInternalStates

This function exposes the internal states. Modifying such states may result in wrong behaviors. You need to understand the [source code](https://github.com/pmndrs/valtio/blob/main/src/vanilla.ts) thoroughly to use it.

# unstable_replaceInternalFunction

This function exposes a way to replace some internal functions. It can easily break things. You need to understand the [source code](https://github.com/pmndrs/valtio/blob/main/src/vanilla.ts) thoroughly to use it.
10 changes: 0 additions & 10 deletions docs/api/hacks/unstable_buildProxyFunction.mdx

This file was deleted.

Loading

0 comments on commit eac3442

Please sign in to comment.