Disclaimer: This is built on awesome work done by marty-wang
- cd {YOUR_PROJECT}
- Start the react-native packager if not started
$ react-native start
| Demo mobile app using WordPress REST API | |
| https://github.com/scottopolis/wp-rest-api-demo | |
| Expose Post Formats in WP REST API | |
| https://github.com/kucrut/wp-bridge-post-formats | |
| WP REST API endpoint for menus | |
| https://github.com/kucrut/wp-bridge-menus | |
| Powerful framework plugin for turning your WordPress theme into an isomorphic JavaScript application using the REST API |
| var svg = document.querySelector( "svg" ); | |
| var svgData = new XMLSerializer().serializeToString( svg ); | |
| var canvas = document.createElement( "canvas" ); | |
| var ctx = canvas.getContext( "2d" ); | |
| var img = document.createElement( "img" ); | |
| img.setAttribute( "src", "data:image/svg+xml;base64," + btoa( svgData ) ); | |
| img.onload = function() { |
| // Takes a screenshot of a URL or HTML string. Optionally, set viewport size | |
| // and resolution, or capture only a specific element | |
| // | |
| // Usage: `phantomjs rasterize.js URL|[or URI encoded HTML string] output size scale element` | |
| // | |
| // Examples: | |
| // `phantomjs rasterize.js http://google.com google.png` | |
| // `phantomjs rasterize.js http://google.com img/google-logo.png auto 1 \#hplogo` | |
| // `phantomjs rasterize.js %3Chtml%3E%3Cbody%3E%3Ch1%3EHello%20world!%3C%2Fh1%3E%3C%2Fbody%3E%3C%2Fhtml%3E hello-world.png | |
| // |
| var email = require('mailer'); | |
| email.send({ | |
| host : "smtp.gmail.com", | |
| port : "465", | |
| ssl : true, | |
| domain : "i-visionblog.com", | |
| to : "someone@someone.com", | |
| from : "author@ivb.com", | |
| subject : "Mailer library Mail node.js", |
| /* | |
| This method auto-binds `this` context, | |
| so that you don't always have to type: | |
| ``` | |
| const foo = this.foo.bind(this) | |
| ``` | |
| You would call this function from within a | |
| React class `constructor` method, like so: |
| <?php | |
| $bakbi = @$_GET['type']; | |
| switch ($bakbi) { | |
| case 'javascript': | |
| header('Content-Type: application/javascript'); | |
| break; | |
| case 'html': | |
| header('Content-Type: text/html'); | |
| break; | |
| case 'css': |
| adb reverse tcp:8081 tcp:8080 | |
| adb logcat *:E | |
| react-native start --port=8080 | |
| react-native run-android | |
| adb shell input keyevent 82 |
Disclaimer: This is built on awesome work done by marty-wang
$ react-native start
| #start react-native in port 8088 | |
| $ react-native start --port=8088 | |
| #download the bundle of android know bug in react-native | |
| $ curl http://localhost:8088/index.android.bundle?platform=android | |
| #inside react-native's android project build the assembleRelease flavor | |
| $ ./gradlew assembleRelease | |
| #go to the apk's android folder |