-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support Expo Web out of the box! #1686
Conversation
It appears that expo doesn't support adding items from code to the dev menu yet :'( https://forums.expo.io/t/devsettings-addmenuitem-in-devmenu-on-expo-client/47079 |
7f1915a
to
c2967dd
Compare
This is ready for review. All tests passing. |
229f928
to
a120a56
Compare
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.
Approved with some very minor suggestions. Great work @markrickert !!!!
83943ea
to
67ddcb2
Compare
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.
I was able to run this without any issues to both an expo app (ios, android, & web) and a non-expo app (ios & android). 🎉
67ddcb2
to
fe49f8e
Compare
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.
One little nit, but we're ready to go otherwise! @markrickert
}, []) | ||
|
||
return <RNImage {...props} style={[imageSize, props.style]} /> | ||
} |
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.
Note that React Native Web is considering a new API for the Image component, which may help us here. But in the meantime, this will do nicely.
@@ -154,13 +155,14 @@ export default { | |||
.replace(/hello-world/g, projectNameKebab) | |||
let packageJson = JSON.parse(packageJsonRaw) | |||
|
|||
const merge = require("deepmerge-json") |
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.
I'd probably move this back into the if
statement below, since it's not needed anywhere except there.
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.
We can do this later. I'm merging.
# [7.0.0](v6.12.2...v7.0.0) (2021-05-28) ### Bug Fixes * **boilerplate:** add background color to navigators to fix white flash ([#1672](#1672) by [@calendee](https://github.com/calendee)) ([32989d2](32989d2)) ### Features * **web:** Web support when using —expo ([#1686](#1686) by [@markrickert](https://github.com/markrickert)) ([2be1dd2](2be1dd2)) ### BREAKING CHANGES * **web:** We've been getting a lot of questions over the years about supporting web on Ignite. **It's here!** For new Ignited apps, if using Expo (`--expo` option), web will be supported out of the box! We're making this a breaking change because we do change a few things around how AsyncStorage is handled, but the impact should be minor if you're upgrading from a recent version of an Ignited app. ### Additional notes: * There's a new component, `AutoImage`, that makes images resize automatically even when the source is a URL. It's a drop-in replacement for the built-in React Native `Image` component * Upgrade expo and dependencies to 40.0.1 * Integrate web-compatible reactotron package * Removed the yarn.lock file from the boilerplate as its generated automatically during the ignite process * Web is not currently supported if you're using the non-Expo version of Ignite
🎉 This PR is included in version 7.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Please verify the following:
yarn ci:test
jest tests pass with new tests, if relevantREADME.md
has been updated with your changes, if relevantDescribe your PR
This updates expo in a big way to support expo web out of the box.
40.0.1
yarn.lock
file from the boilerplate as its generated automatically during the ignite process.I tested this multiple time, generating about 20 projects over the course of the evening last night.
It built projects that compile and run:
./ignite/bin/ignite new testapp --overwrite
ios & android./ignite/bin/ignite new testappExpo --expo --overwrite
ios, android, and web.Linting, tests, and CI all passing.
A note about Storybook: Because expo doesn't expose the DevSettings API to add debug menu items, expo native doesn't support toggling storybook with the debug menu. You can invoke expo storybook on the web by appending
?storybook=true
to the web url.