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

Make methods Chainable ⛓, Release 1.2.0 #17

Merged
merged 2 commits into from
Jun 25, 2017
Merged

Make methods Chainable ⛓, Release 1.2.0 #17

merged 2 commits into from
Jun 25, 2017

Conversation

JRJurman
Copy link
Member

@JRJurman JRJurman commented Jun 25, 2017

Make methods return an instance of the app, so that you can chain multiple methods. This logic is completely backwards compatible, as these methods were previously void.

Resolves #10

Example:

app = new Tram()
  .addRoute('/', () => Tram.html()`<div>Home</div>`)
  .addRoute('/404', () => Tram.html()`<div>Error</div>`)
  .start('.main')

Tram-One Changes

  • addReducer returns an instance of this
  • addRoute returns an instance of this
  • start returns an instance of this
  • mount returns an instance of this

@JRJurman JRJurman changed the title Make methods Chainable ⛓ Make methods Chainable ⛓, Release 1.2.0 Jun 25, 2017
@JRJurman JRJurman merged commit 4d86931 into master Jun 25, 2017
@JRJurman JRJurman deleted the chainable branch June 25, 2017 06:11
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.

1 participant