-
Notifications
You must be signed in to change notification settings - Fork 82
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
Fresnel 2 #19
Fresnel 2 #19
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SSR option for the dripsy provider will probably get deprecated to keep all web behavior consistent, but good to keep it for the time being.
Could we leave the |
src/components/index.tsx
Outdated
@@ -1,16 +1,24 @@ | |||
import { createThemedComponent } from '../css/create-themed-component' | |||
import { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind if we disregard this file for this PR, and instead merge from #15 once the issues mentioned there are resolved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes will do!
I'll leave out the components. Those must have snuck in there my bad. |
Cool no worries |
For the web test, does this include SSR (i.e. the next example?) |
No, I didn't test the next-example project. I can run the test for that one too. |
Awesome, thanks for taking it on. I've been a bit swamped this week finishing another project, but I should be done with it by EOW and will have more bandwidth to close out the remaining issues. |
Re: the
For some reason, |
@nandorojo I'm running into similar problems getting the next example working. I got a configuration that gets all the way to build a build and then runs into an invariant violation from multiple versions of react. I'll try rollback some of my changes and give your method a shot. |
Yeah, the multiple versions of React was solved for me by getting rid of the |
Got it working by wrapping the withExpo plugin around the withTM plugin. I'm still running into the same issue I had with the gatsby site I was working on, it doesn't look like fresnel is removing the additional dom nodes with match media but instead keeping them all. Here's a screenshot: Not sure if this was intended or not but I thought that match-media was supposed to do some cleanup. |
I see. It looks like the fresnel nodes are still there, but they are cleaning up their children, correct? Seems like only the |
They are cleaning up their children. So fresnel should cleanup only children elements but not the parent containers? |
Good question...I wonder what their thinking is behind that. Maybe we could make an issue on their repo? They were pretty responsive when I asked questions there before. |
That's probably the move maybe they can shed some light on it. |
Opened an issue here: artsy/fresnel#147 |
Curious to see what they say. |
I see that you got this working with Next.js. I'm trying to get this tested on my end. Are you using |
Next example seems to be working well for me on web! I had to However, if I I think it's because expo doesn't support monorepos out of the box. When I copied your custom config from Could you add the necessary config files from your (I had no issues running the |
Sweet good to hear! I'll try to get this working so that these can be merged in. Once we get some feedback from the fresnel guys we should be gtg. |
Great. Assuming the fresnel lib can clean up the extraneous parent nodes, I don't see how using it could be less performant than using React Native's |
Yeah, should be sweet. It looked like overall that it was working pretty well. |
Could this help for the Next.js symlinks? martpie/next-transpile-modules#9 (comment) |
I'd be interested in trying to use yarn workspaces with it. I've had success in the past with yarn workspaces + expo-yarn-workspaces. Not sure how well it plays with next, but I'm down to try because right now it's painful getting them to work nicely together. |
Yeah I was thinking the same thing. I really like expo + next.js, and it would be great to figure out how they mesh together with yarn workspaces. |
Same I think that would be cool. I'm running it with a gatsby project rn and it works well I don't see why that wouldn't translate to next. I don't mind trying to get the repo working with yarn workspaces after we get some of this other stuff done. |
This seems to be working all around for me. Confirming that it's good to merge? |
Agreed. I think it would be great to get a workspace working for this, since local testing with |
It should be good to merge. I'll try to get a yarn workspace version of the repo working later today. |
The resizing really isn't that bad when it's published in production. The lag is far more noticeable in dev mode. Final point. The one annoying thing about using this branch is that you often have to use the Example:
The child As a result, you have to do something like: <View
sx={{ flex: [0, 1] }}
webContainerSx={{ flex: [0, 1] }}
/> I tried spreading the There will probably just need to be a section in the docs about this, especially describing the behavior with flex. I don't think I've really run into this with any styles other than flex. All that said, I do feel pretty comfortable merging this. I don't have much quantitative data on performance, so I'll try to use the profilers before doing so, but it seems like it's all pretty quick to me, even though I'm generating an insane number of DOM nodes. (Down the line, it could be worth figuring out a way to achieve what Fresnel does with |
Description
Changed configuration of example project by removing the tsconfig.json, adding tweaks to the webpack config and babel config to get the example app working across different apps. Added react and react-native as peer dependencies in dripsy.
Working on #14
Devices tested on example app w/o SSR option on DripsyProvider
Example
NextJs Example