This file contains hidden or 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, { Component } from 'react'; | |
| import { Provider } from 'react-redux'; | |
| import { createStore, applyMiddleware } from 'redux'; | |
| import ReduxThunk from 'redux-thunk'; | |
| import reducers from './reducers'; | |
| import Islem from './components/Islem'; | |
| class Main extends Component { | |
| render() { | |
| const store = createStore(reducers, {}, applyMiddleware(ReduxThunk)); |
This file contains hidden or 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, { Component } from 'react'; | |
| import { | |
| AppRegistry, | |
| Text | |
| } from 'react-native'; | |
| import SqlService from './Providers/SqlService' | |
| export default class sqllite extends Component { | |
| constructor(props) | |
| { |
This file contains hidden or 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
| const SQLite = require('react-native-sqlite-storage'); | |
| const NativeEventEmitter = require('EventEmitter'); | |
| class SqlService extends NativeEventEmitter { | |
| constructor(props) { | |
| super(props); | |
| } | |
| async execute(sql, value, type) { | |
| type = type || "array"; | |
| let db = SQLite.openDatabase("react.db", "1.0", "React Database", 200000); | |
| const tx = await ( |
This file contains hidden or 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 org.pgsqlite.SQLitePluginPackage;//Eklememeiz gereken satır | |
| public class MainApplication extends Application implements ReactApplication { | |
| . | |
| . | |
| . | |
| @Override | |
| protected List<ReactPackage> getPackages() { |
This file contains hidden or 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
| . | |
| . | |
| . | |
| dependencies { | |
| . | |
| . | |
| . | |
| compile project(':react-native-sqlite-storage') | |
| } | |
| . |
This file contains hidden or 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
| rootProject.name = 'rnsil' | |
| . | |
| . | |
| .//Aşağıdaki kodları ekliyoruz | |
| include ':react-native-sqlite-storage' | |
| project(':react-native-sqlite-storage').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sqlite-storage/src/android') | |
| . | |
| . | |
| . | |
| include ':app' |
This file contains hidden or 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 { AppRegistry } from 'react-native'; | |
| import Main from './src/Main'; | |
| AppRegistry.registerComponent('ornekproje', () => Main); |
This file contains hidden or 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, { Component } from 'react'; | |
| import { TextInput } from 'react-native'; | |
| import { connect } from 'react-redux'; | |
| import { sayiChanged } from '../actions'; | |
| class Islem extends Component { | |
| render() { | |
| console.log(this.props.sayi); | |
| return ( |
This file contains hidden or 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 { combineReducers } from 'redux'; | |
| import IslemReducers from './IslemReducers'; | |
| export default combineReducers({ | |
| IslemResponse: IslemReducers | |
| }); |
This file contains hidden or 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 { SAYI_DEGISTIR } from '../actions/types'; | |
| const INITIAL_STATE = { | |
| sayi: '0', | |
| }; | |
| export default (state = INITIAL_STATE, action) => { | |
| switch (action.type) { | |
| case SAYI_DEGISTIR: | |
| return { ...state, sayi: action.payload }; | |
| default: |
NewerOlder