-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Template project? #54
Comments
Nah. The setup is trivial though and documented in the README. If you prefer looking at something already setup you'll probably be able to find other projects on github using scalajs-react. There's this project's If someone wants to create a template project, feel free and I can open this issue to track it and help out if needed. |
https://github.com/chandu0101/scalajs-react-template please review it :) |
@chandu0101 could we flatten those package names a bit? how about just «template»? also I've written something you could consider a template - for todomvc.com: |
sure , changed to scalajsreact.template ( intellij didn't allowed me refactor to just template) |
hey @chandu0101 , would you mind if we did some mutual review of these two projects? I want some code in todomvc so people can easily compare what we're doing here with other ways, and they of course want some experienced people to have a look to confirm that i'm not doing anything stupid. or could you lend a hand, @japgolly ? still talking about tastejs/todomvc#1323 (comment) that i mentioned above |
sure mate , to be honest i am still learner in react/scala , lemme see if i can find something useful! :) val model = new TodoModel(Storage(dom.ext.LocalStorage, namespace)) i see this created for every route access! , can we move this to Main file as its constant for whole app! val routerM = React.render(router, dom.document.getElementById("todoapp")) why its assigned to routerM ? :s tomorrow i'll give closer look , Mean while feel free review mine :) |
I'll create some links to these and @ochrons's SPA tut as well. Disclaimer: I only skimmed through both of your stuff. I'll take your word that it all actually works :) @chandu0101 I don't agree with your organisation - things are spread all over the place for no benefit in my opinion. That's my only real feedback. Everything else looked fine enough. I was interesting to see how to do styles - it's quite different than how I do them. I have one styles object for my entire app. It has inner objects for organisation. Interesting to see a different approach.
|
thanks for your time mate , if my guess is correct you're not happy with routes package! , that being said love to know what you have in your mind :) |
The way I look at it, if you have a component that has a backend, props, The routes I consider separate because the component or "feature" doesn't Now I'm a bit of a hypocrite (call me a lying bastard!) because contrary to On 7 June 2015 at 11:08, Chandra Sekhar Kode notifications@github.com
|
class!, that sums up all . organizing code is subjective it just reflects perspective of dev nothing more! styles : I see scalacss as pure inline styles with magic of all css support(pseudo selectors ,media queries, prefix ,...) , apart from that when ever i start a new component (not container components) i always think it as a reusable component ( how many end up as real reusable components is a question though :p) thats why i place styles near to component def so that i can easily lift them to a different projects. Note : thank you for making scalacss happen ,lots of love, cheers 👍 |
Thanks a lot for your time , @japgolly .
That leaves your comment about state in two places. I really thought it was more logical the way I did it, but will experiment with it. |
Np & thanks to both of you. Rock on and I'll link to your stuff when I next work on scalajs-react documentation. 👍 👍 |
Documented in 6a0817f |
Cool. I need to follow up to actually have that PR merged, will update that link for you when that happens |
Is there a sbt template project available on gibthub that i can just check out and run in order to get started quickly with scalajs-react?
The text was updated successfully, but these errors were encountered: