Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Separate client and server logic #45

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wingleung
Copy link

@wingleung wingleung commented May 10, 2018

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';

ljharb
ljharb previously requested changes May 10, 2018
Copy link
Collaborator

@ljharb ljharb left a 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)

@wingleung
Copy link
Author

@ljharb good that the concept is the right way to go, worked it out a little more please review.

Copy link
Collaborator

@ljharb ljharb left a 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() {},
Copy link
Collaborator

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: () => {}

Copy link
Author

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

@ljharb ljharb dismissed their stale review May 11, 2018 19:54

deferring to others

@ljharb ljharb requested a review from goatslacker May 11, 2018 19:55
@wingleung wingleung force-pushed the separate-client-and-server-logic branch 2 times, most recently from 53149e7 to aad6a8a Compare May 12, 2018 07:02
@wingleung wingleung force-pushed the separate-client-and-server-logic branch from b645d05 to e8fb23f Compare July 26, 2018 09:21
@wingleung
Copy link
Author

@ljharb @goatslacker ready to review, this PR splits server and client code making client code smaller

@ljharb ljharb force-pushed the separate-client-and-server-logic branch from e8fb23f to 681dbf3 Compare August 15, 2018 19:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants