Experience-Monks / f1

A stateful ui library
MIT License
78 stars 5 forks source link

added things necessary for browser tool to work #7

Closed cheapsteak closed 8 years ago

cheapsteak commented 9 years ago

Attached f1 states specific to an element to its DOM node so they can be operated on when inspected

Attach each f1 element with their states to a global object that will be read by the devtool

mikkoh commented 9 years ago

I've been reviewing this pull request. It looks like the main thing is caching the states for a specific ui element. It might be better to implement this as a separate module to query f1 states. This will keep the kb of f1 down. Sorry @cheapsteak this is sort of harsh feedback. Please if you see any reason why these features should be built into f1 let me know.

Actually I'm not sure the ability to query f1 modules should be a separate module but should be something like require('f1/query')(states, 'stateName', 'uiName')

cheapsteak commented 9 years ago

I have no objections to moving it to a separate module This was the quickest method to get something working :) How would it access f1's states?