People who code: we want your input. Take the Survey

Hot answers tagged


Just add the below param to your config file: access-control-allow-origin = "*" Or you can even run the nodeos command with this parameter, check mine: nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --access-control-allow-origin "*" --access-control-allow-headers "*" --access-control-allow-credentials true


The EvaCoop-Team forked eosjs to make it more compatible with react-native. Async handling in react-native is a big mess with the original eosjs. Here's the link to the git react-native-eos which also contains examples.


If you just want to read data you can use the EOS RPC API. Then you can use the Fetch API (for React Native) to connect to it promised based. Your code could look something like this to read from a table of a contract. fetch(<http://{host}:{port}/v1/chain/get_table_rows>, { method: 'POST', headers: { Accept: 'application/json', 'Content-...


EDIT: Actually your blocks are the data.rows so you can copy it. Also the getTableRows function is an async call. That's why we add async and await which will handle the method synchronosly. export const getBlocks = async () => { console.log("get blocks called"); let blocks = []; await eos.getTableRows(true, "blockboard", "blockboard", "...

Only top voted, non community-wiki answers of a minimum length are eligible