Your apple id must be registered as an app developer on the account. In order to give your user access to profiles and certificates, your account must have the developer-level credential, at a minimum. This will allow you to create a development certificate on your machine and upload it as well as download any relevant profiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const loggerMiddleware = (logger) => (store) => (next) => async (action) => { | |
const response = await next(action); | |
logger(action.type, store.getState()); | |
return response; | |
} | |
export default loggerMiddleware(console.log); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#consider using a 'formatter' collaborator and then using: | |
delegate :min_yardage, to: :formatter, prefix: formatted | |
# so that `formatted_min_yardage` returns the formatted value. | |
#A formatter might be a. PORO with a block passed to new line: | |
def formatter | |
@formatter = ModelFormatter.new(self) do | |
include ActionView/Helpers::NumberHelper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ErrorHandling | |
def respond_with_errors(error: nil, resource: nil, status: 422, **options) | |
add_error(:base, error) if error.present? | |
self.errors = resource.errors if resource&.errors&.is_a? ActiveModel::Errors | |
render json { | |
error: errors.full_messages.to_sentence, | |
errors: errors, | |
full_errors: errors.full_messages, | |
success: false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# REF https://ruby-doc.org/stdlib-2.1.3/libdoc/json/rdoc/JSON.html#method-i-parse | |
module RequestJSONHelpers | |
def response_json | |
JSON.parse(response.body, object_class: HashWithIndifferentAccess) | |
end | |
end |
- All Actions will use
payload
for values that would be in the body of a corresponding HTTP Post. - Actions will provide meta information as
action.meta
... which a reducer can/will store as a property of an individual record - Values that might appear in a query string, such as id will be included in the action as top-level properties (id, post_id, comment_id, etc);
Approaches
-
Monorepo - 2 codebases: Rails (API) + Webpacker, React Runtime, no React on Rails
- Complex deployment, Simplified test-writing, complex test-running
- Full separation of behaviors
- Mirrors PTE
- Some tight-coupling allowed in deployment
- could be easily converted to Capacitor app
- could be built for native mobile api access
-
Multirepo (not allowed in this case) - Above +
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Component extends React.Component { | |
onScroll(event) { | |
this.scrollPosition = getScrollPosition(event); | |
if (this.scrolling) return; | |
this.scrolling = true; | |
const processLongOperation = (beginPosition) => { | |
longOperation(beginPosition, (completionState) => { | |
this.setState(completionState, () => { | |
//rendered |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def func a, c, d | |
puts "a: " + a.to_s | |
puts "c: " + c.to_s | |
puts "d: " + d.to_s | |
end | |
def func2 *args | |
puts args.to_s | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ParentWidget(properties) { | |
Object.assign(this, properties); | |
} | |
function farewell() { | |
console.log('Goodbye Cruel ' + this.name); | |
} | |
ParentWidget.prototype.farewell = farewell; |
NewerOlder