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

Maintenance: Upgrade to React v16 #435

Open
2 of 4 tasks
fahad19 opened this issue Jul 16, 2018 · 4 comments
Open
2 of 4 tasks

Maintenance: Upgrade to React v16 #435

fahad19 opened this issue Jul 16, 2018 · 4 comments

Comments

@fahad19
Copy link
Member

fahad19 commented Jul 16, 2018

Currently

Our API of frint-react is based on the context API of React v15.

React v16 still supports the old (v15) context API in deprecated mode, but also makes room for additional improvements.

It has also introduced APIs like getDerivedStateFromProps , making way for better async rendering (while also deprecating componentWillReceiveProps).

Proposal

We already have some additional proposals which make the API of FrintJS more simpler and stays close to the Component lifecycle where possible. Making it even easier to migrate to React v16:

While migrating to React v16, we can:

  • Drop observe HoC
  • Drop data prop in Region component
  • Drop RegionService

Because parent props as a stream would be difficult to access, since componentWillReceiveProps is already deprecated and will be gone in React v17.

It will have to be a breaking change.

@kristianmandrup
Copy link

Sounds cool :) I'm working on this now... Please let me know if anyone else is interested.
Is this project "dead"??

I'm trying to make frintjs work with atomico which uses reactive custom elements (aka web components) and seems a more modern and natural fit for frintjs.

Would much appreciate some advice for how to make a frint adapter for custom elements

@fahad19
Copy link
Member Author

fahad19 commented Feb 3, 2020

Hey @kristianmandrup,

Thanks for the interest!

I don't work at the same company any more, therefore not actively maintaining this project. Feature-wise, the project is complete. And nothing more is intended to be added. Except for maintenance, upgrades, etc.

If it is reactive components that you are after, agnostic of any specific components library, you can check out another project of mine here: https://proppyjs.com/

@kristianmandrup
Copy link

Hi @fahad19 , thanks for replying so quickly. I thought as much, that the project is "done and dusted" for now. Could be good to at least update the deps to React 16.x and perhaps convert it to TS.
I've started this in my fork.

I'll check out proppyjs as suggested. Have you looked at MeiosisJS by any chance?

I saw that you mentioned there was no need for observe HoC with React 16. This would make it much easier to wrap other rendering engines I believe. Was exactly my concern when I was trying to wrap a render function, rendering VDOM or even DOM elements directly as output, without any "life cycle" logic (except for hooks perhaps).

Do you have any suggestion for how a "modern" wrapper interface might look like?

  • Drop observe HoC
  • Drop data prop in Region component
  • Drop RegionService

How could FrintJS best support both variants? make these optional?

Cheers

@fahad19
Copy link
Member Author

fahad19 commented Feb 3, 2020

Do you have any suggestion for how a "modern" wrapper interface might look like?

@kristianmandrup: I explored some radically different ideas before here: #415

may help.

Could be good to at least update the deps to React 16.x and perhaps convert it to TS.

PRs welcome :)

I am sure I can bring in folks like @rbardini to help out with the release.

How could FrintJS best support both variants? make these optional?

I always saw the entire project very decoupled. If you look at the core frint package, it's really nothing much more than a DI container library.

If someone wants to take a different direction with the same core principles supporting new rendering libraries (or even existing ones with different APIs), you are completely free to do so.

Just create new frint-* packages :D

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

No branches or pull requests

2 participants