<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Guide to create a reducer that is connected to the nRFConnectCore store in the boilerplate?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/31147/guide-to-create-a-reducer-that-is-connected-to-the-nrfconnectcore-store-in-the-boilerplate</link><description>Reffering to the boilerplate: NordicSemiconductor/pc-nrfconnect-boilerplate 
 Can someone make a quick guide to create a reducer that is connected to the nRFConnectCore[0] store in the boilerplate? Just the minimal necessities. 
 If this question is wrong</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Mar 2018 12:20:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/31147/guide-to-create-a-reducer-that-is-connected-to-the-nrfconnectcore-store-in-the-boilerplate" /><item><title>RE: Guide to create a reducer that is connected to the nRFConnectCore store in the boilerplate?</title><link>https://devzone.nordicsemi.com/thread/123056?ContentTypeID=1</link><pubDate>Tue, 06 Mar 2018 12:20:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a99be7fa-944b-4e27-9dc6-53d992c26d05</guid><dc:creator>Edvard Gjessing Bakken</dc:creator><description>&lt;p&gt;Hi Magne,&lt;/p&gt;
&lt;p&gt;Thanks for the response. It enlightened many aspects!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Like you said, it was all in the export of reduceApp in index.jsx&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The problem i had was that i had two reduceApp functions in the export, because i did not notice the boilerplate came with an allready made reduceApp function so i made my own. The program has for many days now exported an empty reducer which did nothing, twisting my brain for why not my self made reduceApp function did not work.&lt;/p&gt;
&lt;p&gt;Have a nice day!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Guide to create a reducer that is connected to the nRFConnectCore store in the boilerplate?</title><link>https://devzone.nordicsemi.com/thread/122944?ContentTypeID=1</link><pubDate>Tue, 06 Mar 2018 07:45:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:237d638a-e3b4-442d-9fe1-f654349d3ed7</guid><dc:creator>Magne Rodem</dc:creator><description>&lt;p&gt;Hi Edvard,&lt;/p&gt;
&lt;p&gt;The API reference gives some information and examples on how to create reducers in nRF Connect apps: &lt;a href="https://github.com/NordicSemiconductor/pc-nrfconnect-core/wiki/API-reference#adding-information-to-state"&gt;https://github.com/NordicSemiconductor/pc-nrfconnect-core/wiki/API-reference#adding-information-to-state&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The state in nRF Connect for desktop is structured like this:&lt;/p&gt;
&lt;p&gt;{&lt;br /&gt;&amp;nbsp; core: {&lt;br /&gt;&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;&amp;nbsp; },&lt;br /&gt;&amp;nbsp; app: {&lt;br /&gt;&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;&amp;nbsp; },&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;The state below `state.core` is managed by the core framework. Here you will find state related to logging, navigation, serial ports, etc. that is common for all apps. The state below `state.app`, however, is managed by the app. If you implement a `reduceApp` function in your app&amp;#39;s index.jsx as described in the API reference, then you should be able to add some custom state in your app.&lt;/p&gt;
&lt;p&gt;You were asking specifically about the root reducer. That can be found here: &lt;a href="https://github.com/NordicSemiconductor/pc-nrfconnect-core/blob/master/lib/windows/app/reducers/index.js"&gt;github.com/.../index.js&lt;/a&gt;. If you follow the reducer tree from here, then you will see what information can be found in `state.core`, and how `state.app` is implemented.&lt;/p&gt;
&lt;p&gt;Also, you may know this already, but if you build pc-nrfconnect-core in development mode (`npm run dev`), and open the development console(Ctrl+Shift+I) when you have the app running, you will see a log of all actions that are dispatched and how they affect the state.&lt;/p&gt;
&lt;p&gt;I hope this cleared things up a bit. Feel free to contact me if you have further questions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Guide to create a reducer that is connected to the nRFConnectCore store in the boilerplate?</title><link>https://devzone.nordicsemi.com/thread/122913?ContentTypeID=1</link><pubDate>Mon, 05 Mar 2018 22:02:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a353ea7-c1b9-4188-9ecc-8e6155d1200d</guid><dc:creator>Edvard Gjessing Bakken</dc:creator><description>&lt;p&gt;i see that i exluded some key points:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The index.js[0] reducer export i mentioned is taken from the nRF Connect BLE[1]. I have studied the code in this repository and based my boilerplate-project on how the reducers and actions is connected this repo.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;[0]&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfconnect-ble/blob/master/lib/reducers/index.js"&gt;github.com/.../index.js&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[1] &lt;a href="https://github.com/NordicSemiconductor/pc-nrfconnect-ble"&gt;github.com/.../pc-nrfconnect-ble&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>