menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Divjoy

The โš›๏ธ React codebase generator.

Channels
Team

I made a Team Bios component ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ

March 28, 2019 at 3:25pm

I made a Team Bios component ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ

March 28, 2019 at 3:25pm (Edited 3 years ago)
What do you think?
If you'd like to load it into Divjoy just go to its exported code above and copy the contents of divjoy-project.json, then import it into Divjoy by selecting import from the top drodown menu (screenshot below). Note: This will overwrite any existing work you have in Divjoy.
Screen Shot 2019-03-28 at 8.23.33 AM.png

March 28, 2019 at 5:00pm
Great work! ๐Ÿ˜
like-fill
1
Thanks ! Will add this to the components library that's coming soon ;)
Yeah that's lovely
like-fill
1
I am a bit surprised that 'divjoy-project.json' file also contains the data(user profile data). I am sure about Divjoy architecture but is data not suppose to be in different file than configuration?
The user data you see there is passed in as props to the bio cards, as you might do when coding normally. Potentially we could add our own data abstraction around redux. Is that what you have in mind?
Edited
I think that will be good so that user data can change to dummy text when importing into another project
like-fill
1
I believe redux is over kill for most apps :) What I mean is to separate the user data(bio card data) from the rest of the UI configuration and stored in a separate .json file.
like-fill
2
Agreed :) Here's a better version that splits it up into TeamBiosSection and TeamBios components: https://bit.ly/2uyH7tW. TeamBios receives an array of people and uses the Divjoy foreach node to iterate through and pass data to cards. Of course, data is still hard-coded in props, but this way it would be easier to extract out later since it's just one array. I like the idea of letting people create data that gets imported from another file (or at least is declared outside the component body), just haven't quite figured out the UI for that. Similarly, we also need a way for people to create reusable functions. Keep the feedback coming! Open to all ideas.
Edited
like-fill
2

March 29, 2019 at 12:14pm
That looks far better to me. Thank you.
like-fill
2