This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type DropdownProps = { | |
expanded: boolean, | |
value: string | number, | |
onChange: (string | number) => void, | |
onExpand: () => void, | |
onCollapse: () => void, | |
options: { | |
[optionValue: string | number]: string | React$Element | |
}, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import StoreProvider from './StoreProvider'; | |
const increment = { type: '@counter/increment' }; | |
const decrement = { type: '@counter/decrement' }; | |
const initialState = { count: 0 }; | |
const reducer = (state = initialState, action) => { | |
switch (action.type) { | |
case increment.type: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Counter from './counter'; | |
const mapProps = ({ state, dispatch }) => ({ | |
count: state, | |
increment: () => dispatch({ | |
type: 'increment', | |
}), | |
decrement: () => dispatch({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import createModelComponent from './create-model-component'; | |
import { Post } from 'restful'; | |
const Model = createModelComponent(0, { | |
increment: () => prevState => prevState + 1, | |
decrement: () => prevState => prevState - 1, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function withLivekit(config: ExpoConfig): ExpoConfig { | |
config = withLivekitAndroid(config); | |
config = withLivekitIOS(config); | |
return config; | |
} | |
function withLivekitAndroid(expoConfig: ExpoConfig): ExpoConfig { | |
return withMainApplication(expoConfig, (config) => { | |
let contents = config.modResults.contents; | |
// Replace com.example with your package name |