issues
search
ovidiuch
/
react-component-playground
Minimal frame for loading and testing React components in isolation.
MIT License
76
stars
16
forks
source link
Keep editor in sync with component state (two-way binding)
#9
Closed
ovidiuch
closed
9 years ago
ovidiuch
commented
9 years ago
Functionality:
[x] Poll loaded component and update fixture contents with snapshot
[x] Don't update fixture contents while editor is focused
[x] Automatically focus on editor when changing fixture (prevent overriding the original fixture right after selecting it)
Remaining concerns:
[x] Does the component render too often? i.e. should it re-render when the state is updated on interval?
[x] Test with Flatris
Tests:
refreshing fixture contents
[x] should register interval on mount
[x] should clear interval on unmount
on callback
[x] should not set state when fixture is not selected
with fixture selected
[x] should not set state when editor is focused
with editor blurred
[x] should mark user input state as valid
[x] should serialize preview child
[x] should update child snapshot state
[x] should stringify preview child snapshot
[x] should update stringified child snapshot state
[x] should set state flag on editor focus
[x] should unset state flag on editor blur
[x] should focus on editor on fixture click
Functionality:
Remaining concerns:
Tests: