| /* Make sure to add following extensions: | |
| **************************************** | |
| * 1. APC Customization UI++ | |
| * 2. Symbols Icon Theme | |
| * 3. AbelFubu theme -> AbelFubu Contrast variant *Note: theme is only for syntax highlighting, ui colors are included in this file. | |
| * 4. Make sure to change a few settings like font, font size to your liking. | |
| **************************************** | |
| */ | |
| { |
| import React from 'react'; | |
| import { useMinScreen } from './minScreen'; | |
| const App = () => { | |
| const { min } = useMinScreen(); | |
| return ( | |
| <> | |
| {min`md` && <div>I'll show at md and up</div>} | |
| {!min`lg` && <div>I'll show at up to lg</div>} |
| { | |
| "alfredtheme" : { | |
| "result" : { | |
| "textSpacing" : 5, | |
| "subtext" : { | |
| "size" : 10, | |
| "colorSelected" : "#FEFFFEC4", | |
| "font" : "System", | |
| "color" : "#C6C6C665" | |
| }, |
Today I learned something at work. I am new to MobX and I had to make changes to a React + Typescript + MobX project. I noticed the props of some React components were marked as optional, and I was told it was because of how the dependency injection worked.
When injecting MobX stores into React components in Typescript, the recommended approach in MobX docs involves declaring optional props (?). This results in having to perform null checks when accessing an injected store, and MobX recommendeds using the non-null assertion operator (!).
interface BananaProps {| create assets folder inside android/app/src/main if not exist | |
| react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res | |
| react-native run-android |
This is a proposal for ReactiveConf 2017 open call for Lightning talks. If you'd like to make this talk happen, please 🌟 this gist and retweet my tweet. 🙏
✅ Don't just prototype but code as a designer
| /* | |
| * Handling Errors using async/await | |
| * Has to be used inside an async function | |
| */ | |
| try { | |
| const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
| // Success 🎉 | |
| console.log(response); | |
| } catch (error) { | |
| // Error 😨 |
Unless specified otherwise in Vagrantfile, the IP address of the host (the computer running Vagrant) from the perspective of the guest
(the VM being run by Vagrant) is: 10.0.2.2
If that IP address doesn't work, then examination of Vagrantfile should reveal directives that changed it from its default value.
If an IP address can't be found in Vagrantfile, then the following command will probably reveal it:
route -A inet| import React from 'react' | |
| import { connect } from 'react-redux' | |
| import { redirect as redirectAction } from 'src/redux/auth/action'; | |
| class Index extends React.Component { | |
| static propTypes = { | |
| redirect: React.PropTypes.func.isRequired, | |
| }; |
