Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 25 2021 20:19
    sigmasoldi3r commented #17
  • Oct 25 2021 20:18
    sigmasoldi3r opened #17
  • Sep 21 2021 05:08
    dependabot[bot] labeled #13
  • Sep 21 2021 05:08
    dependabot[bot] opened #13
  • Sep 21 2021 05:08

    dependabot[bot] on npm_and_yarn

    Bump tmpl from 1.0.4 to 1.0.5 … (compare)

  • Sep 21 2021 05:03
    dependabot[bot] labeled #17
  • Sep 21 2021 05:03
    dependabot[bot] opened #17
  • Sep 21 2021 05:03

    dependabot[bot] on npm_and_yarn

    Bump tmpl from 1.0.4 to 1.0.5 … (compare)

  • Aug 11 2021 04:05
    dependabot[bot] labeled #12
  • Aug 11 2021 04:05
    dependabot[bot] opened #12
  • Aug 11 2021 04:05

    dependabot[bot] on npm_and_yarn

    Bump path-parse from 1.0.5 to 1… (compare)

  • Aug 11 2021 04:02
    dependabot[bot] labeled #16
  • Aug 11 2021 04:02
    dependabot[bot] opened #16
  • Aug 11 2021 04:02

    dependabot[bot] on npm_and_yarn

    Bump path-parse from 1.0.5 to 1… (compare)

  • May 12 2021 01:22
    dependabot[bot] labeled #11
  • May 12 2021 01:22
    dependabot[bot] opened #11
  • May 12 2021 01:22

    dependabot[bot] on npm_and_yarn

    Bump merge from 1.2.0 to 1.2.1 … (compare)

  • May 12 2021 01:18
    dependabot[bot] labeled #15
  • May 12 2021 01:17
    dependabot[bot] opened #15
  • May 12 2021 01:17

    dependabot[bot] on npm_and_yarn

    Bump merge from 1.2.0 to 1.2.1 … (compare)

Zahari Dichev
@zaharidichev
Thank you
Zahari Dichev
@zaharidichev
one more question I had. Is there a way to redirect println() statements to the IOS system log. And in general what is the situation with logging ?
virtualirfan
@virtualirfan

Some more questions from @zaharidichev

Hi there, I had a few questions rega
regarding testing UIs that have been created with SRI. What do you generally recommend
We kind of want to have a way to drive created UIs, press buttons and make assertions on the results. As you guys have a lot more experience in the ecosystem, I wonder whether you know about something that can help us.
Either a particular library or the approach that it takes

And,

@zaharidichev
I took a brief look at scalajs-jest and how you guys use ti to test your SRI modules and it looks to me that in its essence, it gives you the ability to make assertions on how the UI tree looks like in java script
but it seems to lack features such as emulating a press of a button and inspecting the result of it, etc

Chandra Sekhar Kode
@chandu0101

@zaharidichev

one more question I had. Is there a way to redirect println() statements to the IOS system log. And in general what is the situation with logging ?

Nit: Once you have compiled output then sri part is done ,everything else is react-native. you'll get quick answers if you ask in react-native discord or react-native forums ..

Zahari Dichev
@zaharidichev
@chandu0101 This answer fits with what my understanding so far is. Thank you
I wonder however, what is the current state of scalajs-react-interface/enzyme and is there any examples where it has been used ?
Chandra Sekhar Kode
@chandu0101
@zaharidichev to be honest i never used that
Zahari Dichev
@zaharidichev
I see
I somehow have the feeling that coming with a solid testing methodology for our app will be a journey
Zahari Dichev
@zaharidichev
@zaharidichev to be honest i never used that
@chandu0101 didn’t you actually put that together ?
Chandra Sekhar Kode
@chandu0101
yeah i only wrote that facade , but never used it
Zahari Dichev
@zaharidichev
I see
Zahari Dichev
@zaharidichev
just another quick question
in case I want to pass in extra props that are not defined
can I use extraProps field
and if so how do I pass multiple extra props
like in the case of a TextInput, I want to pass maxLength as well as returnKeyType
how is that possible
I was looking through the code but did not find any examples
Chandra Sekhar Kode
@chandu0101
@zaharidichev extraProps takes js.Object ,extraProps = js.Dynamic.literal(maxLength = 10, returnKeyType = "Enter")
Zahari Dichev
@zaharidichev
thank you
Zahari Dichev
@zaharidichev
Hi there guys, I am wondering whether there is s way to set the parameters of a navigator from within a NavigationScreenComponent. Pretty much what I want to do is to have a header button that is interacting with the state of the screen component I am currently within. What is a proper way to do that ? I assume its via the parameters ?
Zahari Dichev
@zaharidichev
Also, have you guys ever experimented with using SRI with redux ?
Chandra Sekhar Kode
@chandu0101

Also, have you guys ever experimented with using SRI with redux

diode is scala redux+!

ashu2012
@ashu2012
Hi @chandu0101 , I know your busy can you answer few questions :- did sri is updated with latest scala-js react ? and as native apps doesn't have dom e.t.c so code already written using scala-js react can be added easily or i have do complete rewrite ?
Chandra Sekhar Kode
@chandu0101

did sri is updated with latest scala-js react

did you mean David's scalajs-react ? if yes, no sri doesnt have scalajs-react interop layer.

ashu2012
@ashu2012
but your code looks similar as you explained in docs :-ScalaJS wrapper for react-native .This project depends on scalajs-react , so you must be familiar with scalajs-react in order to use this library.
calajs-react-native comes with ReactNativeComponentB (its clone of scalajs-react ReactComponentB with native dependencies and extra helper methods ).
@chandu0101 am i looking into old docs ?
Chandra Sekhar Kode
@chandu0101
yes , i am not linked to scalajs-react-native anymore.
ashu2012
@ashu2012
so what must be my bet if i want to build react-native if already have web app using scalajs- react japgolly . I want to use some native component as camera and opening web page is not available in mobile in webview.
@chandu0101 shall i look elsewhere like shadaj react native e.t.c ?
Chandra Sekhar Kode
@chandu0101
hmm , sri react-native is mature than other existing solutions out there !.but current examples doesnt work with latest react-native. @zaharidichev have local updated version, hope they'll push soon.
Vadim Bondarev
@haghard
Hello folks, I’d like to ask the follo
wing question: Is it possible to pass some params from MainActivity/MainApplication to MobileApp.scala(hope you see what I mean)
Vadim Bondarev
@haghard
Anyone ? Please
Chandra Sekhar Kode
@chandu0101
@haghard i dont know, ask in react-native discord channel
Jack
@JackDavidson
Hey, I was able to get a react-native-web app working with SRI (so its cross platform web, android, and ios) with SRI, but for web ('react-scripts start') I get eslint errors about undefined functions. I cant seem to modify the eslint rules, either. My workaround has been to an eslint-ignore comment to the top of the .js file that SRI outputs, and everything works fine but its a manual step. Do you know any way that I could edit the build.sbt file to automatically add the eslint-ignore line at the top? Also, I plan to make a public git repo with this as soon as I get it working.
Nikolay Khoroshevskyi
@rossoha
@chandu0101 Is it possible to expose function from components in SRI ? component that in the end will be analog of
class Step extends React.Component {
  constructor(props) {
 this.state = {
// State fields. 
    };
  }
  sendState() {
    return this.state;
  }

 render() {
    const { prop, classes } = this.props;
// Render stuff
  }
}
Jack
@JackDavidson
@NikolayKhoroshevsky Are you trying to ask if you can export components defined in RSI for use in react?
Nikolay Khoroshevskyi
@rossoha
@JackDavidson Yes. :)
Jack
@JackDavidson
then yeah, definetly. but IDK about the properties. you could probably export a function that will act like what you want

`import sri.universal.components.TextC
import scala.scalajs.js.annotation.JSExportTopLevel
import scala.language.postfixOps

object MobileApp {
def main(args: Array[String]) = {}
@JSExportTopLevel("MyExportedComponent")
val MyExportedComponent = TextC("some text")
}`

import sri.universal.components.TextC
import scala.scalajs.js.annotation.JSExportTopLevel
import scala.language.postfixOps

object MobileApp {
  def main(args: Array[String]) = {}
  @JSExportTopLevel("MyExportedComponent")
  val MyExportedComponent = TextC("some text")
}
then in react
render() {
  const MyStuff = require("./assets/js/scalajs-output-android").MyExportedComponent;
  return MyStuff
}