Comments (9)
yeah, see the bottom of the dripsy instructions for Web. you should use link
to load fonts in on web, just like any website.
from solito.
This might help
useFonts can actually work on the web
from solito.
your next config isn’t a proper array. withFonts should go before withExpo’s array.
from solito.
Like this ? why? I'm getting the same error:
module.exports = withPlugins(
[withTM, [withFonts , [withExpo, { projectRoot: __dirname }]]],
nextConfig
)
In the doc says :
const { withExpo } = require('@expo/next-adapter');
const withFonts = require('next-fonts');
module.exports = withExpo(
withFonts({
projectRoot: __dirname,
})
);
from solito.
No, the first one is still wrong.
module.exports = withPlugins(
[withTM, withFonts, withImages, [withExpo, { projectRoot: __dirname }]],
{
// ...
}
)
from solito.
Ok, thanks. I've seen it's here! :)
https://solito.dev/install
But it's still not working for me because the useFonts
functions seems to be not loading. I'm getting a blank page
export function Fonts({ children }) {
const [loaded] = useFonts({
dripsy: require('app/assets/fonts/Inter/Inter-Regular.ttf'),
dripsyBold: require('app/assets/fonts/Inter/Inter-Bold.ttf'),
})
return <>{loaded && children}</>
}
export function Dripsy({ children }: { children: React.ReactNode }) {
const colorMode = useColorScheme()
return (
<Fonts>
<DripsyProvider
theme={colorMode === 'dark' ? theme : themeLight}
// this disables SSR, since react-native-web doesn't have support for it (yet)
ssr
>
{children}
</DripsyProvider>
</Fonts>
)
}
Is it supposed that any folder behind packages/app
is shared between nextJS and expo? I've tried to place the files under / public ...
in nextJs but it's not working either
from solito.
useFonts is only meant to run on the native app, are you using it on Web?
from solito.
yeap, i'm trying to use for web (nextJS) (using the same code for both native and web)
Should I split the code and load it on web in other way? which way do you recommend?
from solito.
Hey guys, I added a full example for using custom fonts with Solito here.
npx create-solito-app@latest my-solito-app -t with-custom-font
from solito.
Related Issues (20)
- solito website side nav on mobile looks broken HOT 7
- Missing web/index.html limits some web functionality HOT 3
- add a proper replace function in useRouter hook for redirects HOT 2
- pnpm HOT 1
- Solito Image in Expo Go HOT 7
- `replace()` should support deeply-nested navigators HOT 3
- Can't import png HOT 9
- create-solito-app fails to compile HOT 10
- Broken web link in Solito docs HOT 1
- How to implement responsive SolitoImage using nativewind ? HOT 5
- Update multiple params at once HOT 1
- "⚡️ Instant Clone & Deploy" TailwindCSS Example not working HOT 1
- solito.dev website is unavailable HOT 4
- SolitoImageProvider loader not working HOT 6
- Cannot navigate to index "/" using Solito Links HOT 5
- Bump metro resolution in expo-router start HOT 2
- Next 13 appDir HOT 1
- SolitoImage not working on native from minimal starter project HOT 7
- next-transpile-modules is deprecated and I believe it's slowing down the site HOT 2
- Feature Req: Interaction Sync across Devices w/ BrowserSync-like solution for real time responsive design dev 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 solito.