mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Explain the **motivation** for making this change. What existing problem does the pull request solve? The Android permissions native module was open sourced recently (https://github.com/facebook/react-native/commit/b7352b46671d09471d6aa9355ea41368ea05df96) but it is currently undocumented and requires directly interfacing with the native module. This provides a JS wrapper to make it easier to use the permissions module and documents it. This could be cleaner if the native code used Promise blocks instead of callbacks, but I didn't want to change the native code without a thumbs up since I'm guessing this is used in one of facebook's apps. Happy to do that if it makes sense I also tried to make the `PERMISSIONS` object a class property - it works in the actual code but not in the documentation (think it's a jsdocs problem), so decided to initialize in the constructor. **Test plan (required)** If the API looks good, I will change the UIExplorer example to use this. cc andreicoman11 Closes https://github.com/facebook/react-native/pull/9292 Differential Revision: D3716303 Pulled By: andreicoman11 fbshipit-source-id: cd40b8757fdf70ea8faecfb58caa00e99a99789e
Install prerequisites
Before running the website, make sure you've run the following:
git clone https://github.com/facebook/react-native.git
cd react-native
npm install
Run the website server
The first time, get all the website dependencies loaded via
cd website
npm install
Then, run the server via
npm start
open http://localhost:8079/react-native/index.html
Anytime you change the contents, just refresh the page and it's going to be updated.
Publish the website
cd website
npm run publish-website