Skip to content
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

How does Yavin work with React JS? #1728

Open
QubitPi opened this issue Nov 21, 2023 · 1 comment
Open

How does Yavin work with React JS? #1728

QubitPi opened this issue Nov 21, 2023 · 1 comment

Comments

@QubitPi
Copy link

QubitPi commented Nov 21, 2023

Hi Yavin team,

We have used Yavin for some time and we like it! So our team are looking at some customization on top of it. Some of them include:

  1. i18n, i.e. translating the whole into Chinese
  2. login feature
  3. an online interactive guide for the first-time yavin dashboard user
  4. etc...

These above raised one issues for us: our team is heavily based on React but yavin is written in Ember. We would like to fork, customize, and potentially contribute back to yahoo-yavin using React JS. Is there a way to develop Yavin using React in some way?

Thank you for your attention

@cythrawll
Copy link
Contributor

cythrawll commented Nov 21, 2023

Hello, I have some ideas for you.

  1. Ember has some great i18n libraries.
  2. We actually have login working in our own yavin deployments, we set up login, for example with an express middleware and then expose the navi.user in the ember environment via a server-generated-config.js
  3. that would be cool

So, about react, we've actually recently made the jump to react ourselves in many of our projects, but as yavin is written in ember, if you wish to develop with it, I strongly suggest learning and writing in the ember ecosystem. It's actually a good thing to have experience and knowledge of several frameworks these days. Anyway, if you have existing components in react, there are ways you can expose and embed them in ember. We've actually done this by wrapping react components in ember for custom visualizations and such. It works really well if used sparingly. However, you'll have best results in using it sparingly for complex components where the cost is too high to find or rewrite a ember alternative. For most features you'll probably want to stick with ember as rendering react components in ember can just make things complex for debugging/testing maintainability and might have some performance overhead as well as you have to bootstrap react inside of every ember component that uses react.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants