Is FrintJS compatible with Apollo 2.0?
See original GitHub issueVery excited to see this library! Question about modularity of Frint:
Now that Apollo has adopted observables, how well might frint
and apollo
play together?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
FrintJS - Twitter
Click to Follow FrintJS. FrintJS. @FrintJS. JavaScript framework for building scalable reactive applications. ... Is FrintJS compatible with Apollo 2.0?
Read more >Migrating to 2.0 - Apollo GraphQL Docs
Migrate to Apollo Android 2.0. ... This is a backward compatible change for existing users. Please keep in mind that it will bring...
Read more >frintjs/frint - The modular JavaScript framework - GitHub
Rendering library agnostic (integrates with React, Vue, and Preact); Composable with multiple packages as needed; Each package is focused on doing one thing ......
Read more >GraphQL with Apollo Server 2.0 - YouTube
Learn how to build an API using GraphQL with Apollo Server 2.0, using Firestore as a backend data source.
Read more >Subscriptions in GraphQL with Apollo 2.0 - Medium
Small application to create real time messages and update the favorite ones by using subscriptions with GraphQL, Apollo Server, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @loganpowell! Thanks for your interest!
Few things to understand about FrintJS packages:
frint
This package is for creating Apps (and Child Apps), and for defining the dependencies as Providers. It has nothing to do with rendering, or anything browser specific.
frint-react
This package is for integrating React with FrintJS apps.
Rendering
It allows you to render your FrintJS apps to DOM:
Streaming props
It ships a higher-order component called
observe
that allows access to your App instance, where you can get access to your Providers.Now it is totally up to you to either generate props for your base component synchronously, or stream it using Observable:
Apollo integration
I haven’t worked with Apollo myself, but I see it integrating with FrintJS+React like this.
All the stateful dependencies of your FrintJS App are expected to be set as providers. So your Apollo client could be a provider here:
Now you can access the client from anywhere in your React components tree using the
observe
higher-order component:What if you wanted to use
react-apollo
and itsgraphql
component enhancer?That way, your client is set as a provider, and also lets you use the
graphql
HoC fromreact-apollo
anywhere from your components tree:To summarize, FrintJS does not come in your way of using other solutions like Redux or Apollo (even with their own React specific packages).
Hope that helps!
Closing this issue assuming it answered everything you needed to know for now.
For further reading:
observe
higher-order component: https://frint.js.org/guides/higher-order-components/frint-props
: https://github.com/frintjs/frint-props