andrejewski / raj

The Elm Architecture for JavaScript
https://jew.ski/raj
MIT License
196 stars 8 forks source link

update examples to use the latest tagmeme #21

Closed VinSpee closed 6 years ago

VinSpee commented 6 years ago

Hi!

I'm really liking the look of raj, and still trying to wrap my head around it.

I was looking over the examples, and noticed that they use an older version of tagmeme:

export const ChangeQuery = tag()
export const ReceiveResults = tag()
export const ReceiveError = tag()
export const Search = tag.union([
  ChangeQuery,
  ReceiveError,
  ReceiveResults
])

where the new version of tagmeme no longer uses tag():

import {union} from 'tagmeme'

const Result = union(['Ok', 'Err'])

I would be happy to submit a PR updating the examples, but I'm not quite sure I fully understand yet. I'll take a swing and update w/ any feedback you might have.

andrejewski commented 6 years ago

@VinSpee Thanks for checking Raj out. I have updated those examples in this gist here: https://gist.github.com/andrejewski/dd5608615d3b8feab6af3fafff17a4d8

I think I will remove the examples in the repo. They have been there since the beginning, but are not solely using Raj thus it is so easy for them to go stale as other things change.

There is definitely a need for some documentation/examples around how to use Tagmeme/Raj/Raj-* together, but I would rather keep those resources together in https://github.com/andrejewski/raj-by-example or perhaps create a real-world type project demonstrating things better.

VinSpee commented 6 years ago

I think https://github.com/andrejewski/raj-by-example could be a great place for examples. Also, there's https://github.com/gothinkster/realworld - a spec for a "real-world" example app, which could be very helpful.

VinSpee commented 6 years ago

thanks for the updated examples