cljsrn

https://github.com/drapanjanas/re-natal | https://github.com/drapanjanas/re-natal/wiki/FAQ | https://github.com/condense/mercury-app/wiki | https://github.com/seantempesta/expo-cljs-template/ https://www.npmjs.com/package/create-expo-cljs-app
Oliver George 2021-02-25T01:52:44.005600Z

Ta

raspasov 2021-02-25T15:04:16.007700Z

Has anyone been able to setup react-native-web to work with ClojureScript? https://github.com/necolas/react-native-web

raspasov 2021-02-25T15:56:31.009900Z

Woah, I actually made it work… With a figwheel-main setup… Needs a small tweak in fighweel-main to get the REPL started but very cool nonetheless. Screen Shot 2021-02-25 at 7.56.08 AM.png

👍 1
pez 2021-02-25T15:57:22.010500Z

Congrats!

1
2
💪 2
pez 2021-02-25T15:58:09.011900Z

This example project also has it configured. Cheating a bit, of course. https://github.com/PEZ/rn-rf-shadow

raspasov 2021-02-25T15:58:42.012600Z

Needs like a JavaScript flavor tweak, need a crossed-JS emoji here 😝

raspasov 2021-02-25T15:59:15.013300Z

@pez very cool, I was googling and saw your project, but I haven’t used shadow; that was gonna be my next step if this didn’t work.

raspasov 2021-02-25T15:59:22.013600Z

What is the cheat there?

pez 2021-02-25T16:00:26.014300Z

Expo. Not for all projects. But when it can be used, it is sweet!

raspasov 2021-02-25T16:00:42.014700Z

Yeah, I am going through Expo as well…

raspasov 2021-02-25T16:00:55.015100Z

The setup without expo of react-native-web seems pretty verbose.

raspasov 2021-02-25T16:01:46.016300Z

… in terms of all-JS-tools-i-want-to-know-nothing about 🙂 (wanted to avoid that if possible)

pez 2021-02-25T16:01:52.016500Z

Here’s a very good take at Expo or not Expo: https://www.youtube.com/watch?v=7-t6deIO1JE

raspasov 2021-02-25T16:02:11.017Z

I am not using Expo to build the app… still going through Xcode;

raspasov 2021-02-25T16:02:21.017300Z

I only use some libs here and there that are good.

raspasov 2021-02-25T16:02:50.017700Z

@pez will watch the video, thanks!

raspasov 2021-02-25T16:04:39.019700Z

Basically I pull in expo, but stick to the standard react-native tooling as much as possible… And go through XCode and Android Studio, etc etc… Less magic, and I’ve done through all the setup of those in the past. For somebody who has never touched XCode, it can be overwhelming, even where to click is a challenge (so many knobs, menus, checkboxes, buttons)

pez 2021-02-25T16:06:51.021100Z

For me the best thing with Expo isn’t so much the build tooling. It’s how fast I can get the app tested by users.

raspasov 2021-02-25T16:07:10.021400Z

@pez that’s a great point; because of Expo Go?

pez 2021-02-25T16:07:56.022100Z

Because of the Expo client mostly.

raspasov 2021-02-25T16:08:37.022700Z

Technically you can achieve that without Expo via https://github.com/microsoft/code-push (I used that a few years ago, used to be very easy once setup, but now it seems to require some signup with Microsoft App Center)

❤️ 1
pez 2021-02-25T16:08:59.023100Z

Will check!

raspasov 2021-02-25T16:09:27.023600Z

It just serves your javascript to a native app (that is already in the App Store or Testflight)

raspasov 2021-02-25T16:09:49.024Z

It’s what Expo initially copied pretty much 100% 🙂 (they were pretty open about it)

raspasov 2021-02-25T16:10:11.024600Z

Copied in terms of workflow, not in any malicious way, Expo guys are great

pez 2021-02-25T16:10:56.025200Z

Can you push a react native app using binary libs that way?

raspasov 2021-02-25T16:11:06.025400Z

What do you mean by binary libs

raspasov 2021-02-25T16:11:14.025700Z

That require … compiled code?

raspasov 2021-02-25T16:11:28.026300Z

I don’t think so… Can you through Expo now?

raspasov 2021-02-25T16:12:01.027400Z

I am pretty sure it only worked for JavaScript/Cljs only changes

pez 2021-02-25T16:12:25.028300Z

Those libs you can’t use b/c you use Expo. It is because it all needs to either exist in the Expo client or be pure javascript, if I have understood correctly.

raspasov 2021-02-25T16:12:44.028700Z

If you needed to add a new binary/compiled dependency that requires some “pod install”, you’d need a new testflight or App Store update

pez 2021-02-25T16:13:00.029100Z

Ah, but that would work.

pez 2021-02-25T16:13:26.029600Z

Expo should copy that model. 😃

raspasov 2021-02-25T16:15:01.031500Z

Wait, perhaps we’re misunderstanding each other 🙂 Anyway… I am 95% certain it’s only JavaScript updates that you can push through code-push and expo currently, nothing else.

pez 2021-02-25T16:16:51.033Z

Yeah, but if my App as such can use whatever libs, that’s much better than the Expo offer, where those libs simply can’t be used.

pez 2021-02-25T16:17:16.033600Z

Better in that respect, that is. Expo has a lot going for it.

raspasov 2021-02-25T16:26:18.035400Z

@pez I see what you mean, yeah, if you want custom binary libs, you need your own TestFlight or App Store app with those binaries in place (vs the Expo testing app which only has a preset number of them, if I understand correctly)

raspasov 2021-02-25T16:35:13.036900Z

@bhauman This is the small tweak I needed to do in order to get react-native-web to comply:

// module.exports = {
//   shimRequire: shimRequire,
//   start: startApp,
//   createBridgeComponent: createBridgeComponent
// };

export {
    shimRequire,
    createBridgeComponent
};
Wasn’t sure how to handle the re-naming of the startApp function (as far as I can tell, that’s only needed if you’re not using Expo).

raspasov 2021-02-25T16:36:59.037600Z

@pez did you end up using react-native-web for anything beyond a toy example?

pez 2021-02-25T16:53:20.038Z

Only for toy, so far. 😃

👍 1
joshmiller 2021-02-25T17:19:20.038800Z

Speaking of CodePush, has anyone ever tried just putting the JS for their app on the web and serving from there and caching if necessary? Seems like it wouldn’t be all that difficult.

frankitox 2021-02-25T22:42:15.040700Z

Hi, anyone ever encountered a problem where the debugger disconnects after a reload (in shadow-cljs)? If I add certain closure library namespaces (like goog.date.relative ) then the debugger disconnects in the first reload attempt.

raspasov 2021-02-25T23:03:24.043600Z

I thought about it for a second when I was using CodePush, but CodePush was pretty solid at doing that so I didn’t want to reinvent the wheel; it has some nice things like a CLI and ability to roll back etc... but again I haven’t used it recently so I don’t know what is its state right now