Closed sunrisep12 closed 11 months ago
Getting same error trying to use readRemoteFile, what is the fix/workaround? Sorry very limited React knowledge, don't really understand what the above response means. Config is not being recognised at all, nor can I leave it blank although documentation says its 'optional'.
Edited Today (24/11) I rolled my install back to version 3.17.2 and the problem went away, its a bug.
@flowerbot @sunrisep12
radString
API has been changed from:
const parsedCsv = readString(csvString, { worker: true });
To
readString(csvString, {
worker: true,
complete: (parsedCsv) => {
console.log(parsedCsv);
}
});
I was also struggling with this after the update. Looks like the docs are not up to date here https://react-papaparse.js.org/docs#strings.
Also, why is worker
a required prop if it should be always true
, in this case?
I've been using this library for a while but from today it started throwing an error at
readString()
. I have thisconst parsedCsv = readString(csvString);
from which, later on, I grabparsedCsv.data
andparsedCsv.meta.delimiter
for my purposes. But now, I can't do that as I get an error that saysAn argument for 'config' was not provided.
. Is there a way to set this config tonull
and retrieve this data withoutreadString(str, {worker: true, complete: res => someVar = res.data, someDelimiterVar = res.meta.delimiter})
etc. because on this way I should be dealing with async/await if I'd like to assign the data I need to my values, which I'd like to avoid.