react-waterfall icon indicating copy to clipboard operation
react-waterfall copied to clipboard

redux-devtools return no store found - 4.0.0-beta.4

Open danllach opened this issue 7 years ago • 10 comments

Hi I passed the example code to react native and works wonderful but redux-devtools doesn't work.

On the documentation you said During development redux-devtools are automatically enabled. Install the extension. what's mean automatically enabled? maybe I missed something...

Here is my code:

store.js

import createStore from 'react-waterfall'

const config = {
  initialState: { count: 0 },
  actionsCreators: {
    increment: ({ count }) => ({ count: count + 1 }),
  },
}

export const { Provider, connect, actions } = createStore(config)

App.js

import React from 'react';
import {Button, Text, View} from 'react-native';
import { connect, Provider, actions } from './store'

let Count = ({ count }) => <Text style={{marginTop: 100}}>{count}</Text>
Count = connect(({ count }) => ({ count }))(Count)

export default class App extends React.PureComponent {

  render() {
    return (
      <Provider>
        <Count/>
        <Button title='add' onPress={() => actions.increment()}/>
      </Provider>
    );
  }
}
screen shot 2018-07-12 at 11 33 18 am

Thanks!

danllach avatar Jul 12 '18 15:07 danllach

You're using react-native, we probably need to update the current version to add the ability to communicate through react-native.

didierfranc avatar Jul 12 '18 16:07 didierfranc

thank you so much. It will be awesome!!

Image of Yaktocat

danllach avatar Jul 13 '18 13:07 danllach

BTW, I tried with this library https://github.com/zalmoxisus/remote-redux-devtools but I thing that the way you handle createStore is different... in theory could be

import createStore from 'react-waterfall'
import devToolsEnhancer from "remote-redux-devtools";

const config = {
  initialState: { count: 0 },
  actionsCreators: {
    increment: ({ count }) => ({ count: count + 1 }),
  }
}

export const { Provider, connect, actions } = createStore(config, devToolsEnhancer())
screen shot 2018-07-13 at 10 32 51 am

but it doesn't works :( Any idea how to handle that ?

danllach avatar Jul 13 '18 13:07 danllach

We use directly the redux-devtools API https://github.com/didierfranc/react-waterfall/blob/master/src/helpers/devtools.js

It's not available this way with react-native

didierfranc avatar Jul 17 '18 08:07 didierfranc

That’s mean I will never could integrate with react native? The v3 works with a few middleware but those middleware doesn’t work with v4 neither 😩

danllach avatar Jul 17 '18 12:07 danllach

Yes it will be I just have to find time to do it ;)

didierfranc avatar Jul 17 '18 13:07 didierfranc

@didierfranc Thanks for the work :) Just wanted to ask if you'll be publishing the 4th version soon :) or are you done working on it?

Thank you , RN support is paramount

jeveloper avatar Jul 22 '18 11:07 jeveloper

A v4 finale with react-native support seems perfect and will arrive soon ;)

didierfranc avatar Jul 23 '18 07:07 didierfranc

@didierfranc wonder if you'll publish what you have :) thanks , waiting

jeveloper avatar Aug 10 '18 14:08 jeveloper

I have the same requirement as @danllach regarding use of https://github.com/zalmoxisus/remote-redux-devtools, I didn't understand your later comment @didierfranc, will react-waterfall be able to make use of remote-redux-devtools in v4?

artdevgame avatar Jan 31 '20 09:01 artdevgame