Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] add DFR chapter #18

Merged
merged 1 commit into from
Jul 16, 2016
Merged

[wip] add DFR chapter #18

merged 1 commit into from
Jul 16, 2016

Conversation

yoshuawuyts
Copy link
Member

Figured it'd be nice to highlight how to design reusable components; further zooming in on @maxogden's comments in IRC

This provides the potential to zoom into the design decisions underlying choo; the full interop it has with any methods that operates on raw DOM and highlighting patterns to prevent completely getting tangled up in another framework, yet again.

Also @shama got me a bit worried about completely buying into frameworks haha (as per choojs/choo#152) - feel like having a guide might align mindsets or smth like that.

Anyway this is very much wip - but I'm off to bed so sharing what I got so far. Night!

## Directory structure
In order to facilitate reusability, one must plan for it. Often the hardest
part about modularity is becoming comfortable with determining where the
boundries are. As a rule of thumb: any piece of logic that doesn't directly
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/boundries/boundaries/

const html = require('choo/html')
const Form = require('../components/form')

const renderForm = Form(formInput, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you mean to use a function signature here, ie const renderForm = (formInput) => Form(formInput, {

@timwis timwis mentioned this pull request Jul 16, 2016
46 tasks
@yoshuawuyts
Copy link
Member Author

Yeah cool, addressed all notes - per @timwis's suggestion on IRC let's merge and edit from there - neat to like have this available already ✨

@yoshuawuyts yoshuawuyts merged commit b2321bb into master Jul 16, 2016
@yoshuawuyts yoshuawuyts deleted the creating-components.md branch July 16, 2016 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants