# How to set draco decoder in React Native?

**URL:** <https://discourse.threejs.org/t/how-to-set-draco-decoder-in-react-native/44591>\
**Category:** Questions\
**Tags:** draco, react, react-native\
**Created:** [November 11, 2022, 5:04pm UTC](https://discourse.threejs.org/t/how-to-set-draco-decoder-in-react-native/44591 "2022-11-11T17:04:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mannitou](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@mannitou](https://discourse.threejs.org/u/mannitou)\
**Post date:** [November 11, 2022, 5:04pm UTC](https://discourse.threejs.org/t/how-to-set-draco-decoder-in-react-native/44591/1 "2022-11-11T17:04:24Z")

</div>

Hi,

I would like to load Draco compressed models in an offline React Native app. Since all assets are renamed when compiling the React Native app, the decoder cannot be found if I set the path with ‘dracoLoader.setDecoderPath()’.

Is there any way to predefine the filenames the decoder will look for? Or to pass the files themselves to the DracoLoader?

Best

---

<div class="post-metadata">

**Author:** ![mannitou](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@mannitou](https://discourse.threejs.org/u/mannitou)\
**Post date:** [November 14, 2022, 1:53pm UTC](https://discourse.threejs.org/t/how-to-set-draco-decoder-in-react-native/44591/2 "2022-11-14T13:53:58Z")

</div>

I have now made some alternative attempts. [This](https://gist.github.com/donmccurdy/323c6363ac7ca8a7de6a3362d7fdddb4#file-nodedracoloader-js) works fine in Node, but unfortunately the whole thing still doesn’t work in React Native, because the node standard libraries like ‘path’ or 'fs ’ are not present there.

Is there really no way to load a Draco compressed model offline in React Native?
