Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Writing react native with typescript with redux and react-redux

$
0
0

I was wondering when I write redux action, reducers and store using typescript in React Native, should I give it an extension of .tsx or it can be .js only?

For instance this is my store.tsx file look like this:

import {createStore, applyMiddleware, combineReducers} from 'redux';import {composeWithDevTools} from 'redux-devtools-extension';import thunk from 'redux-thunk';import newsReducer from './reducers/newsReducer';const rootReducer = combineReducers({  news: newsReducer,});const middleware = composeWithDevTools(applyMiddleware(thunk));export default createStore(rootReducer, middleware);

Should my files become all tsx extension in this case?


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>