Menu
Active2 years, 2 months ago
In the spirit of 4th July, I want to establish something thus I am not giving up on this. I've been trying to make it work for a while now(not just today) and frankly I am sick of react native and it's habit of breaking every time I pull a package from npm.
Configure Redux. The first part is a middleware that is looking for GETMOVIEDATA action and calls the API when it’s dispatched. Whenever you dispatch an action with Redux it goes through this middleware. And when GETMOVIEDATA is dispatched it dispatches GETMOVIEDATALOADING action to set loading flag to true in the storage and calls the API. React Native Redux Example Tutorial From Scratch #1: Install React Native. Type the following command. #2: Add Textbox and Button into the App.js. #3: Define the state and input handler. Okay, now we need a state to manage. #4: Create the following folders inside Root. Create the following.
package.json
App.js
store/index.js
reducers/index.js
models/index.js
The rest of the stuff is pretty basic. Project is blank expo project that I wanted to create for the sake of using ORM in redux.
On a side note, and I much prefer a solution to my question than having the focus on this, I can not help but think what am I missing? Yes I am very new to react and react native but why does everyone love react native? I agreed to use it on a project even though I did not want to and now I spend most my of time looking through github issues to make everything in my package json work. Everytime I go 'hey this looks good I want to use it' and run the npm install, everything breaks ... So, honestly, what is the point of working to work? Am I looking at this all wrong?
ODelibaltaODelibalta1,22411 gold badge1111 silver badges2323 bronze badges
1 Answer
I tried out your repository and managed to get it running. The first thing I did was just run
exp start --ios
to see if that would work. It showed me the following error:So I went to App.js and saw that on line 9, Text was used but it wasn't imported, so I imported it from react-native and the app rendered with some text.
Next, I looked at the logs and saw this warning:
I then checked the package.json and saw that there were a bunch of babel modules, but the babelrc didn't actually use any of those -- it only used
babel-preset-expo
. So I removed all of those plugins, closed the packager, and ran exp start --ios
again and the warning went away.I'm not sure how you ended up in the state where you had an error about
brentvatnebrentvatne__fbBatchedBridge is undefined
as in your post, there are a number of ways that can happen. The error message is not very descriptive at all and it should be improved. It's quite possible that the packager was not running (exp start
). Let me know if the problem persists, but the other issues should be resolved. I submitted a pull request with the changes I discussed: https://github.com/ODelibalta/reduxormexposf/pull/13,66811 gold badge1717 silver badges3131 bronze badges
Not the answer you're looking for? Browse other questions tagged reactjsreact-nativereduxexporedux-orm or ask your own question.
Official React bindings for Redux.
Performant and flexible.
Performant and flexible.
Installation
React Redux requires React 16.8.3 or later.
This assumes that you’re using npm package managerwith a module bundler like Webpack orBrowserify to consume CommonJSmodules.
If you don’t yet use npm or a modern module bundler, and would rather prefer a single-file UMD build that makes
ReactRedux
available as a global object, you can grab a pre-built version from cdnjs. We don’t recommend this approach for any serious application, as most of the libraries complementary to Redux are only available on npm.React Native
As of React Native 0.18, React Redux 5.x should work with React Native. If you have any issues with React Redux 5.x on React Native, run
npm ls react
and make sure you don’t have a duplicate React installation in your node_modules
. We recommend that you use [email protected]
which is better at avoiding these kinds of issues.Documentation
The React Redux docs are now published at https://react-redux.js.org .
We're currently expanding and rewriting our docs content - check back soon for more updates!
How Does It Work?
We do a deep dive on how React Redux works in this readthesource episode.
Also, the post The History and Implementation of React-Reduxexplains what it does, how it works, and how the API and implementation have evolved over time.
Enjoy!