alt icon indicating copy to clipboard operation
alt copied to clipboard

Add more examples

Open pekeler opened this issue 9 years ago • 13 comments

Would be nice to see a more complex/realistic example using alt. Showing:

  • full CRUD
  • with asynchronous remote data fetching/storing
  • optimistic rendering with error handling
  • react-router integration
  • user authentication

Basically a full app.

Is there perhaps such an example for one of the other flux libs that would easily translate to alt?

pekeler avatar Feb 13 '15 23:02 pekeler

This is the best example I've seen thus far:

https://github.com/voronianski/flux-comparison/tree/master/alt

It doesn't have some of the bullet points you mention though.

There are a few isomorphic examples here, but they're rather simple:

https://github.com/goatslacker/iso/tree/master/examples

A few other example flux apps not related to alt:

https://github.com/goatslacker/example-ismorphic-one https://github.com/goatslacker/isomorphic-react-template https://github.com/goatslacker/flux-react-router-example

I'm definitely interested in providing a few more complex examples.

goatslacker avatar Feb 13 '15 23:02 goatslacker

Thanks Josh!

pekeler avatar Feb 14 '15 05:02 pekeler

There are a few examples popping up in the near future. I'll close this ticket once they're out in the wild.

goatslacker avatar Feb 25 '15 23:02 goatslacker

A complex example was recently open-sourced by Airbnb.

https://github.com/airbnb/airpal/tree/master/src/main/resources/assets

goatslacker avatar Mar 07 '15 19:03 goatslacker

Here's another example. It shows how to use socket.io with alt and use @goatslacker's iso library in an isomorphic app. It also has user authentication and some db operations.

https://github.com/troutowicz/geoshare

troutowicz avatar Apr 01 '15 01:04 troutowicz

Super awesome. I need to make an EXAMPLES.md file to host all these.

goatslacker avatar Apr 01 '15 01:04 goatslacker

  • [ ] Isomorphic Example
  • [ ] REST Example
  • [ ] CRUD Example
  • [ ] Pagination Example
  • [ ] Derived Data Example

goatslacker avatar Apr 19 '15 06:04 goatslacker

There's now an examples section on readme

https://github.com/goatslacker/alt#examples

goatslacker avatar May 09 '15 22:05 goatslacker

Any example of how to send an error to a view in Flux? I haven't seen the handling of an error in the view without promises being returned from actions (this is against the Flux model.)

The errors here seem to be logged, but not displayed to the user: https://github.com/airbnb/airpal/blob/master/src/main/resources/assets/javascripts/actions/QueryActions.js#L17

hekar avatar Jul 31 '15 15:07 hekar

Put it in state?

goatslacker avatar Jul 31 '15 18:07 goatslacker

@goatslacker Realised that today. Errors are state and should be a part of stores. Thanks

hekar avatar Aug 05 '15 18:08 hekar

Hi, I am interested in a good example for Login/Register/Authenticated pages, etc. Plus expiry of authentication based on token, etc. Is there anything like that anywhere? Thanks.

afilp avatar Feb 02 '16 15:02 afilp

@goatslacker I need help using preact js inside a standalone website without using a precompiler.

example: could be a basic hello world button that opens an alert when clicked.

load preact from a cdn and code the preact app or component to Add onto an html page.

thanks in advance for anyone responding to this message.

hyperking avatar Sep 28 '18 20:09 hyperking