What does HackerNews think of valtio?
💊 Valtio makes proxy-state simple for React and Vanilla
https://github.com/pmndrs/valtio
https://codesandbox.io/s/bitter-night-mm4xes?file=/src/App.j...
// a.js
import { proxy } from "valtio";
export const a = proxy([]);
a.push(1);
// App.jsx
import { useSnapshot } from "valtio";
import { a } from "./a";
const add = () => a.push(a.length + 1);
export default function App() {
const snap = useSnapshot(a);
return (
{snap.map((value, index) => (
- {`${index}=>${value}`}
))}
Add element
);
}
1. We are going to remove Mobx. It will also reduce the learning curve for our customers. This change won't affect our API and will be fully backward compatible. We are considering Valtio as an alternative [0]. 2. As much as we can help it, we are not going to embed iframes. We'd love to deliver a native, and lean experience. 3. We already provide a network layer library [1] and want to offer more headless components. Can you give us some feedback on what you'd like to see? We are very inspired by Downshift's approach [2].
[0] https://github.com/pmndrs/valtio [1] https://www.npmjs.com/package/@magicbell/core [2] https://github.com/downshift-js/downshift