Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Update react example #140

Merged
merged 6 commits into from
Feb 4, 2019
Merged

Conversation

bwasty
Copy link
Contributor

@bwasty bwasty commented Feb 2, 2019

I tried out the react example and made some fixes/improvements:

  • fix path for @parity/light.js (package.json)
  • update dependencies
    • skipped (breaking changes for 2.x): react-scripts, react-app-rewired (-> breaks decorators*)
  • remove hint about window.parity (not working)
  • make font sans-serif

* About the decorators: I would suggest removing them or converting to TypeScript. I think such a simple example should use a 'plain' create-react-app setup, without things like react-app-rewired/config overrides.

- fix path for @parity/light.js (package.json)
- update dependencies
 - skipped (breaking changes for 2.x): react-scripts, react-app-rewired (-> breaks decorators)
- remove hint about window.parity (not working)
- make font sans-serif
@parity-cla-bot
Copy link

It looks like @bwasty signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

1 similar comment
@parity-cla-bot
Copy link

It looks like @bwasty signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

@amaury1093
Copy link
Collaborator

Thanks a lot! Yes, the example might have been left out a bit, thanks for having a look.

I think such a simple example should use a 'plain' create-react-app setup

You're right, I wanted to show "look how cool this lib is with decorators", but for such a simple example, it might be better to drop them. Would you mind doing this in this PR? At the same time remove react-app-rewired and update to CRA2 (plain JS). Cheers!

@bwasty
Copy link
Contributor Author

bwasty commented Feb 3, 2019

Done!
I actually re-created the example into example-react (with yarn create react-app), then copied over the relevant code and deleted the old version. I think -react makes sense since the Angular example (#60) could then go into example-angular.
I also switched from yarn to npm and committed the package-lock.json - I had lots of problems with yarn (super slow - 10min for install if it works, mostly it failed or hung...).

Copy link
Collaborator

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tried, looks good! Thanks for the PR

@amaury1093 amaury1093 merged commit ce4ae75 into openethereum:master Feb 4, 2019
@bwasty bwasty deleted the light_react_example branch February 4, 2019 09:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants