-
Notifications
You must be signed in to change notification settings - Fork 44
Separate client and server logic #45
base: master
Are you sure you want to change the base?
Separate client and server logic #45
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the right way to do it, but we should change index.js
so that it pulls in client and server (so there's only one source of truth)
@ljharb good that the concept is the right way to go, worked it out a little more please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but i'll let others review/merge
src/index.js
Outdated
|
||
client() {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: client() {}
is preferred over client: () => {}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for noticing, arrow function is indeed not necessary in object methods
53149e7
to
aad6a8a
Compare
b645d05
to
e8fb23f
Compare
@ljharb @goatslacker ready to review, this PR splits server and client code making client code smaller |
e8fb23f
to
681dbf3
Compare
Getting #5 started...
existing endpoint left intact to not break current implementations, or should we break?
new import on server side apps
import { renderReact } from 'hypernova-react/server'
;new import client side
import { renderReact } from 'hypernova-react/client'
;