myitcv / react

MOVED TO https://github.com/myitcv/x/blob/master/react/_doc/README.md
BSD 3-Clause "New" or "Revised" License
234 stars 17 forks source link

Lazy load #92

Closed joeblew99 closed 7 years ago

joeblew99 commented 7 years ago

i am amazed at how far you have taken this. Really impressive and useful. Hats off and looking forward to kicking the tires.

Some newbie stuff.

myitcv commented 7 years ago

i am amazed at how far you have taken this. Really impressive and useful.

Thanks @joeblew99

the install client side is big

Things definitely aren't fully optimised as yet. Looking at the most minimal example, http://blog.myitcv.io/gopherjs_examples_sites/helloworld/. Total size is 774K. Of that, 152K is minfied React code. Using Preact is smaller still at 49K. I've got something in the TODO list tracking optimising this further. Nothing as advanced as PRPL / lazy load (yet).

Themes. Yes i know its lame, but well was wondering... Material Design maybe ?

You're totally free to do whatever you like as far as styling etc is concerned. reactGen -init (minimal|bootstrap) is really only to get you started... no constraints.

Equally, if you'd like to contribute a different template, let me know. The -init mode of reactGen is very very hacky for now... so could do with a bit of tidy up before contributions in that space.

joeblew99 commented 7 years ago

Thanks for the info.

For now i am busy on CRDT stuff using yjs. https://github.com/y-js/yjs. Yjs allows you to do google docs style functionality very easily with offline editting. I a, experimenting with it & boltDB as the buckets concept maps to yjs really well. Currently its standard JS, but looking to port to golang. It will allow event store architectures to get automatic offline / online sync. Would be nice addition to your framework..

As far as the other stuff, right now i just have to watch as too busy on CRDT and other bits. But just wanted to raise some things i saw for now.

cheers

Joe

On Sun, Aug 27, 2017 at 5:40 PM Paul Jolly notifications@github.com wrote:

i am amazed at how far you have taken this. Really impressive and useful.

Thanks @joeblew99 https://github.com/joeblew99

the install client side is big

Things definitely aren't fully optimised as yet. Looking at the most minimal example, http://blog.myitcv.io/gopherjs_examples_sites/helloworld/. Total size is 774K. Of that, 152K is minfied React code. Using Preact is smaller still at 49K. I've got something in the TODO list https://github.com/myitcv/react/wiki/TODO tracking optimising this further. Nothing as advanced as PRPL / lazy load (yet).

Themes. Yes i know its lame, but well was wondering... Material Design maybe ?

You're totally free to do whatever you like as far as styling etc is concerned. reactGen -init (minimal|bootstrap) is really only to get you started... no constraints.

Equally, if you'd like to contribute a different template, let me know. The -init mode of reactGen is very very hacky for now... so could do with a bit of tidy up before contributions in that space.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/myitcv/react/issues/92#issuecomment-325206105, or mute the thread https://github.com/notifications/unsubscribe-auth/ALcac5BFdASRWBYRz4KHaJBQF_f-5JaJks5scY4IgaJpZM4PCc9h .

myitcv commented 7 years ago

Sounds interesting @joeblew99!

Anything you want to track by keeping this issue open, given that I'll issues from my TODO?

Thanks

joeblew99 commented 7 years ago

lets close this I will have a look at your todo list, and do some more tire kicking..

myitcv commented 7 years ago

👍

myitcv commented 7 years ago

Also @joeblew99 just in case you've not seen, the Links of the wiki which has examples, creating your first app guide, talks links etc.

Might be of some help - feedback much appreciated too.

joeblew99 commented 7 years ago

@myitcv thansk mate. Yeah i was getting a bit lost in terms of how to reuse existing React components out there.

For intance, the code below is from the GRPCWeb example. You usng bootstrap and then rendering direct creating your own DOm elements as you go. I am trying to work out if i can use a well known existing lib like Material-UI. For example their button... https://github.com/callemall/material-ui/blob/v1-beta/src/Button/Button.js

// Render renders the GetBook component func (g GetBookDef) Render() r.Element { st := g.State() content := []r.Element{ r.P(nil, r.S("Search for book by ISBN (for example, 140008381).")), r.Form(&r.FormProps{ClassName: "form-inline"}, r.Div( &r.DivProps{ClassName: "form-group"}, r.Label(&r.LabelProps{ClassName: "sr-only", For: "isnbText"}, r.S("ISBN")), r.Input(&r.InputProps{ Type: "number", ClassName: "form-control", ID: "isnbText", Value: st.isbnInput, OnChange: isbnInputChange{g}, }), r.Button(&r.ButtonProps{ Type: "submit", ClassName: "btn btn-default", OnClick: triggerGet{g}, }, r.S("Get Book")), ), ), }

if st.book != nil {
    content = append(content, renderBook(st.book))
}

if st.err != "" {
    content = append(content,
        r.Div(nil,
            r.Hr(nil),
            r.S("Error: "+st.err),
        ),
    )
}

return r.Div(nil, content...)

}