Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: linkstate
node v7.10.1
endpoint
share
tweet
> 🤔 Why? > > linkState() is memoized: it only creates a handler once for each (key, eventPath) combination. > > This is important for performance, because it prevents handler thrashing and avoids allocations during render.
oh is it?
var linkstate = require("linkstate"), component = { state: { foo: 'bar' }, setState: () => {} }; linkstate(component, 'foo') === linkstate(component, 'foo')
Created from: https://npm.runkit.com/linkstate
Loading…
no comments
sign in
to comment