Last active
April 8, 2016 13:46
-
-
Save fab1an/0e48f25f0f0e01215fb2c3ff6e5d7617 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* App.makeProps */ | |
static makeProps($) { | |
return { | |
/* call Box.makeProps to construct the substate */ | |
box1: [Box, "1"], | |
box2: [Box, "2"], | |
/* call OtherData.makeProps to get the substate */ | |
OtherData | |
} | |
} | |
/* Box.makeProps */ | |
static makeProps($, dispatch, id) { | |
return { | |
top: $["box" + id].top || 0, | |
left: $["box" + id].left || 0, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment