Comments (3)
Thanks for creating https://www.npmjs.com/package/react-quicklink-component, @HOUCe. This is neat. Outside of leveraging React.children.map()
for this I think your component might be the best option for React native users to take advantage of quicklink's concepts. We otherwise plan to focus on providing a lean core.
I'm going to close up this issue and suggest folks use the above component for RN 👍
from quicklink.
Hey @arximughal @addyosmani ,
I think quicklink can't work with React native/React projects by default. But we can use this anyway by creating a React native/React component which implements with quicklink.
I've made one, check react-quicklink-component. The <Quicklink>
component was designed by render props
pattern and connected with raw quicklink by ref
.
So, we can use like so:
<Quicklink quicklink={options}>
<Comp1 />
...
<CompN />
</Quicklink>
As for React native, I suppose the philosophy is the same. But the key point is how to collect link urls. Quicklink uses document.querySelectorAll
and iterates <a>
tags to get prefetch set which seems impossible for React native. But we can try with React.Children.map()
to filter urls, in this case, we can make a React native version.
from quicklink.
@HOUCe This sounds really great. I have an app in react-native which uses a lot of images. Fortunately, I get all the URLs for the images before starting a quiz so this component can really really help in that matter as I won't have to filter URLs. Thanks for the component, I'll definitely check it out 🙂
from quicklink.
Related Issues (20)
- Allow multiple Speculation Rules HOT 6
- Unrelated Issue, please delete this.
- minConnectionType option
- Switch from mocha to uvu
- site: add SRI hashes for CDN links
- el option not working as it should HOT 1
- Fix Prerender Support HOT 4
- site: add missing `alt` attributes HOT 3
- Mark peerDependencies as optional
- site: use unique page descriptions HOT 1
- infra: Redirect www domain to root
- Document the modern bundle
- No prefetching occurs for duplicate links
- site: use the files from dist folder instead of the CDN HOT 2
- Prerendering is not working HOT 5
- withQuicklink can't not support typescript HOT 1
- Avoid Triggering Requests while offline
- quicklink.prefetch need add option crossorigin attr,support prefetch cross origin resources
- Quicklink causes desynchronizations between pages for users login and cart counter
- Update request for "quicklink" library to fix CORS errors HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quicklink.