Skip to content

[React Native] Can currently only create a blob from other Blobs #40

@hasancanozkan

Description

@hasancanozkan

Hi, I have a RN application and just want to try parallel programming using hamsters.js. First, I created a demo app to try it with a worker, namely https://github.com/fabriciovergal/react-native-workers. however I am getting a strange error,
What version of the library --> 4.2.0
What operating system are you seeing the issue on? --> Windows
Which platform (and or) browser are you seeing the issue on? React Native on andorid
What is the version of the platform (and or) browser you are seeing the issue on? --> RN 48.0
The code that I wrote simply (i saw this in how the library manages your data) :
initHamsters(){
const startOptions = {
maxThreads: 4,
cache: false,
debug: false,
persistence: false,
Worker: Worker
};
hamsters.init(startOptions);
const params = {
array: [1,2,3,4,5,6,7,8,9,10],
animal: 'Hamster',
};
hamsters.run(params, function() {
if(params.animal === 'Hamster') {
rtn.data.push('Hamsters are awesome');
}
}, function(result) {
console.log(result);
});
}
I have to say that there is not so many worker libraries availalbler for react native, and the one that I found was working, i tried it. However, it has some requirements like using two ports and having index.worker.js and I didnt provide them to run this code. the error is like this :
img_1313
and as I understand this is a react native error, which doesnt allow to use this library and Worker library.
Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions