- How I test redux-sagaI’m a fan of redux saga (although I’ve been keeping an eye on redux-observable too).
- I particularly like having all async logic in one place, making it easily testable and having powerful async control flows available where necessary.Because the saga effects only construct a special object that is consumed and executed by the middleware (aka they dont do much!)
- , it is really easy to test your sagas with no mocking required.Few points of note:The mock result of the api (true or false) is injected into the subsequent next() call after the api call.
- clone()” to test different control flow branches
I particularly like having all async logic in one place, making it easily testable and having powerful async control flows available where necessary. Because the saga effects only construct a special…
Continue reading “How I test redux-saga – codeburst”
To get started download VSCode and install the React Native tools extension for VSCode.
- Time travel debugging
The extension uses Node to debug the Expo app.
- If we replace Node with node-chakracore, we also get the ability to use time travel debugging.
- To try out time travel debugging with create-react-native-app and VSCode
Download node-chakra nightly builds – it supports Mac, Windows and Linux 🙂
Grab the debugger code and save it as debugger.js – this is the same code that runs when a React Native app is debugged on Chrome
To start recording a trace
Create a folder called logs, adjacent to debugger.js
Run path-to-node-chakra/bin/node –record debugger.js
To replay a debugging session
Start up VSCode, head to the debug pane and create a new configuration to debug a node project
Add the additional key value pairs to the configuration (as shown in the video).
- This basically sets the node executable to be ChakraCore, points it to the location of the logs that are used for time travel, and sets up source maps
Hit the debug button – you will now see “Reverse Continue” and “Step back” in addition to the usual debug workflow controls
The time travel debugging part is still experimental, but if it sounds fun, let me know, and I would love to make it a part of the extension.Thanks to the amazing folks on the Chakra team for making this possible !
Continue reading “Parashuram’s blog: Debugging create-react-native-app with VSCode”
React.js controlled components. HTML Forms. Input. Textarea. Select.
Continue reading “React.js controlled components”
- Just create a few files for pages in your app, and you are done.
- For example, let’s say you need to create web app with two pages (Home page and About page).
- It uses the file system as the router for your app.
- You need to bring additional stuff which is needed for your app.
- import React from ‘react’ import Header from ‘.
There are too many JS frameworks out there — we all know that.
- We removed support for defining GraphQL schemas in schema language and moved it to an entirely separate npm module – graphql-tools .
- We also wanted to make the project more maintainable by using TypeScript.
- Express-graphql could adopt those features of Apollo Server which have proven themselves in practice.
- Query Batching is a feature we recently introduced in Apollo Client, but it involved merging multiple queries into a single one, which made the queries sent to the server hard to read.
Read the full article, click here.
@ReactiveConf: “Apollo Server 0.2: GraphQL with Express, Connect, HAPI or Koa #ReactJS”
A simple and modular GraphQL server for Node.js
Apollo Server 0.2: GraphQL with Express, Connect, HAPI or Koa — Building Apollo — Medium